Пример #1
0
 internal static string EncodeHash(HashEncoding encoding, byte[] hash)
 {
     return(encoding switch
     {
         Tasks.HashEncoding.Hex => ConversionUtilities.ConvertByteArrayToHex(hash),
         Tasks.HashEncoding.Base64 => Convert.ToBase64String(hash),
         _ => throw new NotImplementedException(),
     });
Пример #2
0
        internal static string EncodeHash(HashEncoding encoding, byte[] hash)
        {
            switch (encoding)
            {
            case Tasks.HashEncoding.Hex:
                return(ConversionUtilities.ConvertByteArrayToHex(hash));

            case Tasks.HashEncoding.Base64:
                return(Convert.ToBase64String(hash));

            default:
                throw new NotImplementedException();
            }
        }