Package anbxj
Class Crypto_HmacPair
java.lang.Object
anbxj.Crypto_HmacPair
- All Implemented Interfaces:
Serializable
A class to store the result of an HMAC operation along with metadata about the used algorithm.
Moreover, it allows carrying information for AnBx private or public digests.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCrypto_HmacPair
(Crypto_ByteArray hashValue, Crypto_SealedPair k, String HMacAlgorithm) Constructs a Crypto_HmacPair with the specified parameters.Crypto_HmacPair
(Crypto_ByteArray hashValue, SecretKey sk, String HMacAlgorithm) Constructs a Crypto_HmacPair with the specified parameters. -
Method Summary
-
Constructor Details
-
Crypto_HmacPair
Constructs a Crypto_HmacPair with the specified parameters.- Parameters:
hashValue
- The hash value.k
- The sealed pair.HMacAlgorithm
- The HMAC algorithm.
-
Crypto_HmacPair
Constructs a Crypto_HmacPair with the specified parameters.- Parameters:
hashValue
- The hash value.sk
- The secret key.HMacAlgorithm
- The HMAC algorithm.
-
-
Method Details
-
getHashValue
Gets the hash value.- Returns:
- The hash value.
-
getK
Gets the sealed pair.- Returns:
- The sealed pair.
-
getSK
Gets the secret key.- Returns:
- The secret key.
-
getAlgorithm
Gets the HMAC algorithm.- Returns:
- The HMAC algorithm.
-
anonymize
public void anonymize()Anonymizes the HMAC pair by removing the public secret key. -
toString
Returns a string representation of the Crypto_HmacPair.
-