ACRCloudWebAPITest.IdentifyProtocolV2.encryptByHMACSHA1 C# (CSharp) Метод

encryptByHMACSHA1() публичный статический Метод

public static encryptByHMACSHA1 ( string input, string key ) : string
input string
key string
Результат string
        public static string encryptByHMACSHA1(string input, string key)
        {
            HMACSHA1 hmac = new HMACSHA1(System.Text.Encoding.UTF8.GetBytes(key));
               byte[] stringBytes = Encoding.UTF8.GetBytes(input);
               byte[] hashedValue = hmac.ComputeHash(stringBytes);
               return encodeToBase64(hashedValue);
        }