Class AsymmetricEdDSAPrivateKey

    • Constructor Detail

      • AsymmetricEdDSAPrivateKey

        public AsymmetricEdDSAPrivateKey​(Algorithm algorithm,
                                         byte[] keyData,
                                         byte[] publicData)
      • AsymmetricEdDSAPrivateKey

        public AsymmetricEdDSAPrivateKey​(byte[] encoding)
                                  throws java.io.IOException
        Construct a key from an encoding of a PrivateKeyInfo.
        Parameters:
        encoding - the DER encoding of the key.
        Throws:
        java.io.IOException
      • AsymmetricEdDSAPrivateKey

        public AsymmetricEdDSAPrivateKey​(PrivateKeyInfo keyInfo)
                                  throws java.io.IOException
        Construct a key from a PrivateKeyInfo.
        Parameters:
        keyInfo - the PrivateKeyInfo containing the key.
        Throws:
        java.io.IOException
    • Method Detail

      • getSecret

        public byte[] getSecret()
      • getPublicData

        public byte[] getPublicData()
      • getEncoded

        public byte[] getEncoded()
        Description copied from interface: AsymmetricKey
        Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
        Specified by:
        getEncoded in interface AsymmetricKey
        Returns:
        an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.security.auth.Destroyable
      • isDestroyed

        public boolean isDestroyed()
        Specified by:
        isDestroyed in interface javax.security.auth.Destroyable
      • equals

        public boolean equals​(java.lang.Object o)
        Description copied from interface: Key
        Return true if o is an equivalent key to this.
        Specified by:
        equals in interface Key
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - object to compare to.
        Returns:
        true if o is the same or equivalent key, false otherwise.
      • hashCode

        public int hashCode()
        Description copied from interface: Key
        Return the hashCode for the key.
        Specified by:
        hashCode in interface Key
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the key's hashCode.