java.lang.Object
org.cryptomator.cryptolib.common.DestroyableSecretKey
org.cryptomator.cryptolib.api.Masterkey
-
Field Summary
FieldsFields inherited from interface javax.crypto.SecretKey
serialVersionUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns an independent copy of this keystatic Masterkeyfrom(DestroyableSecretKey encKey, DestroyableSecretKey macKey) static Masterkeygenerate(SecureRandom csprng) Get the encryption subkey.Get the MAC subkey.Methods inherited from class org.cryptomator.cryptolib.common.DestroyableSecretKey
close, destroy, equals, from, generate, getAlgorithm, getEncoded, getFormat, hashCode, isDestroyed
-
Field Details
-
ENC_ALG
- See Also:
-
MAC_ALG
- See Also:
-
SUBKEY_LEN_BYTES
public static final int SUBKEY_LEN_BYTES- See Also:
-
-
Constructor Details
-
Masterkey
public Masterkey(byte[] key)
-
-
Method Details
-
generate
-
from
-
copy
Description copied from class:DestroyableSecretKeyReturns an independent copy of this key- Overrides:
copyin classDestroyableSecretKey- Returns:
- New copy of
this
-
getEncKey
Get the encryption subkey.- Returns:
- A new copy of the subkey used for encryption
-
getMacKey
Get the MAC subkey.- Returns:
- A new copy of the subkey used for message authentication
-