Class SaltedSecretKey

  • All Implemented Interfaces:,, javax.crypto.SecretKey,

    public class SaltedSecretKey
    extends java.lang.Object
    implements javax.crypto.SecretKey
    A salted secret key is a convenience class to bundle a SecretKey with its corresponding salt. It is mainly used to represent the master key and the master key salt.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructor Description
      SaltedSecretKey​(javax.crypto.SecretKey secretKey, byte[] salt)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getAlgorithm()  
      byte[] getEncoded()  
      java.lang.String getFormat()  
      byte[] getSalt()  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface

        destroy, isDestroyed
    • Constructor Detail

      • SaltedSecretKey

        public SaltedSecretKey​(javax.crypto.SecretKey secretKey,
                               byte[] salt)
    • Method Detail

      • getSalt

        public byte[] getSalt()
      • getAlgorithm

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

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

        public byte[] getEncoded()
        Specified by:
        getEncoded in interface
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • hashCode

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

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