Package org.syncany.crypto
Class SaltedSecretKey
- java.lang.Object
-
- org.syncany.crypto.SaltedSecretKey
-
- All Implemented Interfaces:
java.io.Serializable,java.security.Key,javax.crypto.SecretKey,javax.security.auth.Destroyable
public class SaltedSecretKey extends java.lang.Object implements javax.crypto.SecretKey
A salted secret key is a convenience class to bundle aSecretKeywith its corresponding salt. It is mainly used to represent the master key and the master key salt.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SaltedSecretKey(javax.crypto.SecretKey secretKey, byte[] salt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetAlgorithm()byte[]getEncoded()java.lang.StringgetFormat()byte[]getSalt()inthashCode()java.lang.StringtoString()
-
-
-
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:
getAlgorithmin interfacejava.security.Key
-
getFormat
public java.lang.String getFormat()
- Specified by:
getFormatin interfacejava.security.Key
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncodedin interfacejava.security.Key
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-