mac static method

HMac mac(
  1. int id
)

Implementation

static HMac mac(int id) {
  switch (id) {
    case MD5:
      return HMac(MD5Digest(), 64);
    case MD5_96:
      return HMac(MD5Digest(), 64);
    case SHA1:
      return HMac(SHA1Digest(), 64);
    case SHA1_96:
      return HMac(SHA1Digest(), 64);
    case SHA256:
      return HMac(SHA256Digest(), 64);
    case SHA256_96:
      return HMac(SHA256Digest(), 64);
    case SHA512:
      return HMac(SHA512Digest(), 128);
    case SHA512_96:
      return HMac(SHA512Digest(), 128);
    default:
      throw FormatException('$id');
  }
}