167168169170171172173174175176177
*/ public NtruEncryptKey( byte keyBlob[]) throws FormatNotSupportedException, ParamSetNotSupportedException { NtruEncryptKeyNativeEncoder encoder = new NtruEncryptKeyNativeEncoder(); RawKeyData rawKey = encoder.decodeKeyBlob(keyBlob); keyParams = rawKey.keyParams; h = rawKey.h; f = rawKey.f; }
210211212213214215216217
public byte[] getPubKey() throws ObjectClosedException { if (h == null) throw new ObjectClosedException(); NtruEncryptKeyNativeEncoder encoder = new NtruEncryptKeyNativeEncoder(); return encoder.encodePubKey(keyParams, h); }
225226227228229230231232
if (h == null) throw new ObjectClosedException(); if (f == null) throw new NoPrivateKeyException(); NtruEncryptKeyNativeEncoder encoder = new NtruEncryptKeyNativeEncoder(); return encoder.encodePrivKey(keyParams, h, f); }