Class NTRUSigningPublicKeyParameters

    • Constructor Detail

      • NTRUSigningPublicKeyParameters

        public NTRUSigningPublicKeyParameters​(IntegerPolynomial h,
                                              NTRUSigningParameters params)
        Constructs a new public key from a polynomial
        Parameters:
        h - the polynomial h which determines the key
        params - the NtruSign parameters to use
      • NTRUSigningPublicKeyParameters

        public NTRUSigningPublicKeyParameters​(byte[] b,
                                              NTRUSigningParameters params)
        Converts a byte array to a polynomial h and constructs a new public key
        Parameters:
        b - an encoded polynomial
        params - the NtruSign parameters to use
      • NTRUSigningPublicKeyParameters

        public NTRUSigningPublicKeyParameters​(java.io.InputStream is,
                                              NTRUSigningParameters params)
                                       throws java.io.IOException
        Reads a polynomial h from an input stream and constructs a new public key
        Parameters:
        is - an input stream
        params - the NtruSign parameters to use
        Throws:
        java.io.IOException
    • Method Detail

      • getEncoded

        public byte[] getEncoded()
        Converts the key to a byte array
        Returns:
        the encoded key
      • writeTo

        public void writeTo​(java.io.OutputStream os)
                     throws java.io.IOException
        Writes the key to an output stream
        Parameters:
        os - an output stream
        Throws:
        java.io.IOException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object