public static string GetHash(PCLCrypto.HashAlgorithm alg, string input) { var hasher = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(alg); string hexStr = ByteArrayToString(hasher.HashData(System.Text.UTF8Encoding.UTF8.GetBytes(input))); return(hexStr.ToLower()); }
protected void CopyHashToClipboard(PCLCrypto.HashAlgorithm alg) { var original = FindViewById <EditText>(Resource.Id.etMessage).Text; string copyValue = GetHash(alg, original); CopyToClipboard(copyValue); }