getAlgorithm method

Mac getAlgorithm (Algorithm algorithm)

Gets the Mac for the provided algorithm.

Implementation

static Mac getAlgorithm(Algorithm algorithm) {
  switch (algorithm) {
    case Algorithm.SHA224:
      return Mac('SHA-224/HMAC');
    case Algorithm.SHA256:
      return Mac('SHA-256/HMAC');
    case Algorithm.SHA384:
      return Mac('SHA-384/HMAC');
    case Algorithm.SHA512:
      return Mac('SHA-512/HMAC');
    default:
      return Mac('SHA-1/HMAC');
  }
}