symmetricSign static method
Creates a symmetric signature instance based on the given algorithm.
algorithm: The symmetric signature algorithm (HMAC)
input: The complete input record with configuration
Returns: An instance of the specified signature handler
Throws: ArgumentError if algorithm is not supported
Implementation
static ISymmetricSign symmetricSign(
CryptoAlgorithm algorithm,
InputSymmetricSign input,
) {
return switch (algorithm) {
CryptoAlgorithm.hmac => HMACSign.createFull(InputHMACSign(parent: input)),
_ => throw ArgumentError('Not a symmetric signature algorithm: $algorithm'),
};
}