Package at.favre.lib.hkdf
Interface HkdfMacFactory
-
- All Known Implementing Classes:
HkdfMacFactory.Default
public interface HkdfMacFactoryFactory class for creatingMachashers
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classHkdfMacFactory.DefaultDefault implementation
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MaccreateInstance(SecretKey key)Creates a new instance of Hmac with given key, i.e.SecretKeycreateSecretKey(byte[] rawKeyMaterial)Creates a secret key from a byte raw key material to be used withcreateInstance(SecretKey)intgetMacLengthBytes()Get the length of the mac output in bytes
-
-
-
Method Detail
-
createInstance
Mac createInstance(SecretKey key)
Creates a new instance of Hmac with given key, i.e. it must already be initialized withMac.init(Key).- Parameters:
key- the key used, must not be null- Returns:
- a new mac instance
-
getMacLengthBytes
int getMacLengthBytes()
Get the length of the mac output in bytes- Returns:
- the length of mac output in bytes
-
createSecretKey
SecretKey createSecretKey(byte[] rawKeyMaterial)
Creates a secret key from a byte raw key material to be used withcreateInstance(SecretKey)- Parameters:
rawKeyMaterial- the raw key- Returns:
- wrapped as secret key instance or null if input is null or empty
-
-