SHA1Managed in Windows Phone 8.1

encryption, sha1, windows, windows-phone-8.1

Solution

HashAlgorithmProvider hashProvider = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha1);
IBuffer hash = hashProvider.HashData(CryptographicBuffer.ConvertStringToBinary(someValue, BinaryStringEncoding.Utf8));
string hashValue = CryptographicBuffer.EncodeToBase64String(hash);

Problem

I have been using this while developing windows phone 8 apps to hash string but I cannot find equivalent in windows phone 8.1 ``` SHA1Managed sha1 = new SHA1Managed(); byte[] res = sha1.ComputeHash(System.Text.Encoding.UTF8.GetBytes(this.Uuid + this.SessionToken)); return BitConverter.ToString(res, 0, res.Length).Replace("-", "").ToLower(); ``` How can I compute hashes in Windows Phone 8.1 using SHA1?

Original source