GetHashAlgorithm() public static méthode

Gets the HashAlgorithm with the specified IPFS multi-hash name.
public static GetHashAlgorithm ( string name = DefaultAlgorithmName ) : HashAlgorithm
name string
Résultat System.Security.Cryptography.HashAlgorithm
Exemple #1
0
 public void GetAlgorithmByName()
 {
     Assert.IsNotNull(MultiHash.GetHashAlgorithm());
     Assert.IsNotNull(MultiHash.GetHashAlgorithm("sha2-512"));
     var e = ExceptionAssert.Throws <KeyNotFoundException>(() =>
     {
         var _ = MultiHash.GetHashAlgorithm("unknown");
     });
 }