IronPigeon.CryptoProviderExtensions.CreateWebSafeBase64Thumbprint C# (CSharp) Метод

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

Creates a web safe base64 thumbprint of some buffer.
public static CreateWebSafeBase64Thumbprint ( this cryptoProvider, byte buffer ) : string
cryptoProvider this The crypto provider.
buffer byte The buffer.
Результат string
        public static string CreateWebSafeBase64Thumbprint(this CryptoSettings cryptoProvider, byte[] buffer)
        {
            Requires.NotNull(cryptoProvider, "cryptoProvider");
            Requires.NotNull(buffer, "buffer");

            var hasher = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(cryptoProvider.SymmetricHashAlgorithm);
            var hash = hasher.HashData(buffer);
            return Utilities.ToBase64WebSafe(hash);
        }