public static HashAlgorithm CreateHashAlgorithm()

in JetBrains.SbomUtils/src/JetBrains.SbomUtils/HashCalculator.cs [41:48]


  public static HashAlgorithm CreateHashAlgorithm(ChecksumAlgorithm algorithm) => algorithm switch
  {
    ChecksumAlgorithm.SHA1 => SHA1.Create(),
    ChecksumAlgorithm.SHA256 => SHA256.Create(),
    ChecksumAlgorithm.SHA384 => SHA384.Create(),
    ChecksumAlgorithm.SHA512 => SHA512.Create(),
    _ => throw new NotSupportedException($"Hash algorithm {algorithm} is not supported"),
  };