Package dk.hyperdivision.multisig_hmac
Class Sign
java.lang.Object
dk.hyperdivision.multisig_hmac.Sign
public class Sign extends Object
Sign represents a sign of data with a key
- Author:
- Amalie Due Jensen
-
Constructor Details
-
Sign
public Sign(IndexKey KeyObj, byte[] Data, String Algorithm) throws InvalidKeyException, NoSuchAlgorithmExceptionConstructs and initializes a sign of data with a key A list of instances of Sign can be passed to an instance of Combine- Parameters:
KeyObj- - instance of IndexKeyData- - data which should be signedAlgorithm- - algorithm used for HMAC- Throws:
InvalidKeyException- - if the given key is inappropriate for initializing this HMACNoSuchAlgorithmException- - if the specified algorithm is not available
-
-
Method Details
-
sign
public static byte[] sign(IndexKey KeyObj, byte[] Data, String Algorithm) throws InvalidKeyException, NoSuchAlgorithmExceptionIndependently signs data with a key- Parameters:
KeyObj- - instance of indexKeyData- - data which should be signedAlgorithm- - algorithm used for HMAC- Returns:
- sign of data
- Throws:
InvalidKeyException- - if the given key is inappropriate for initializing this HMACNoSuchAlgorithmException- - if the specified algorithm is not available
-