public class NTRUEncryptionPublicKeyParameters extends NTRUEncryptionKeyParameters
h
.Modifier and Type | Field and Description |
---|---|
IntegerPolynomial |
h |
params
Constructor and Description |
---|
NTRUEncryptionPublicKeyParameters(byte[] b,
NTRUEncryptionParameters params)
Converts a byte array to a polynomial
h and constructs a new public key |
NTRUEncryptionPublicKeyParameters(java.io.InputStream is,
NTRUEncryptionParameters params)
Reads a polynomial
h from an input stream and constructs a new public key |
NTRUEncryptionPublicKeyParameters(IntegerPolynomial h,
NTRUEncryptionParameters params)
Constructs a new public key from a polynomial
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
byte[] |
getEncoded()
Converts the key to a byte array
|
int |
hashCode() |
void |
writeTo(java.io.OutputStream os)
Writes the key to an output stream
|
getParameters
isPrivate
public IntegerPolynomial h
public NTRUEncryptionPublicKeyParameters(IntegerPolynomial h, NTRUEncryptionParameters params)
h
- the polynomial h
which determines the keyparams
- the NtruEncrypt parameters to usepublic NTRUEncryptionPublicKeyParameters(byte[] b, NTRUEncryptionParameters params)
h
and constructs a new public keyb
- an encoded polynomialparams
- the NtruEncrypt parameters to usegetEncoded()
public NTRUEncryptionPublicKeyParameters(java.io.InputStream is, NTRUEncryptionParameters params) throws java.io.IOException
h
from an input stream and constructs a new public keyis
- an input streamparams
- the NtruEncrypt parameters to usejava.io.IOException
writeTo(OutputStream)
public byte[] getEncoded()
NTRUEncryptionPublicKeyParameters(byte[], NTRUEncryptionParameters)
public void writeTo(java.io.OutputStream os) throws java.io.IOException
os
- an output streamjava.io.IOException
NTRUEncryptionPublicKeyParameters(InputStream, NTRUEncryptionParameters)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object