Package org.conscrypt

Class OpenSslMlDsaPrivateKey

  • All Implemented Interfaces:
    java.io.Serializable, java.security.Key, java.security.PrivateKey, javax.security.auth.Destroyable, OpenSSLKeyHolder

    public class OpenSslMlDsaPrivateKey
    extends java.lang.Object
    implements java.security.PrivateKey, OpenSSLKeyHolder
    An OpenSSL ML-DSA private key.
    See Also:
    Serialized Form
    • Constructor Detail

      • OpenSslMlDsaPrivateKey

        public OpenSslMlDsaPrivateKey​(byte[] seed,
                                      MlDsaAlgorithm algorithm)
    • Method Detail

      • isValid

        private static boolean isValid​(byte[] encodedSeed,
                                       MlDsaAlgorithm algorithm)
      • getAlgorithmFromEncodedSeed

        private static MlDsaAlgorithm getAlgorithmFromEncodedSeed​(byte[] encodedSeed)
      • encodeSeed

        private static byte[] encodeSeed​(byte[] unencodedSeed,
                                         MlDsaAlgorithm algorithm)
      • getAlgorithm

        public java.lang.String getAlgorithm()
        Specified by:
        getAlgorithm in interface java.security.Key
      • getFormat

        public java.lang.String getFormat()
        Specified by:
        getFormat in interface java.security.Key
      • getEncoded

        public byte[] getEncoded()
        Specified by:
        getEncoded in interface java.security.Key
      • getSeed

        byte[] getSeed()
      • 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)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        private void readObject​(java.io.ObjectInputStream stream)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream stream)
                          throws java.io.IOException
        Throws:
        java.io.IOException