예제 #1
0
파일: Hasher.cs 프로젝트: Structum/Elements
        /// <summary>
        ///     Creates and returns the Hashing Algorithm instance.
        /// </summary>
        /// <param name="type">Algorithm Type.</param>
        /// <returns>Symmetric Algorithm Instance.</returns>
        private static HashAlgorithm CreateAlgorithm(CryptographicHashAlgorithmType type)
        {
            string algorithm = Enum.GetName(typeof(CryptographicHashAlgorithmType), type) ?? "SHA256";

            return(HashAlgorithm.Create(algorithm));
        }
예제 #2
0
파일: Hasher.cs 프로젝트: Structum/Elements
 /// <summary>
 ///     Initializes a new instance of the <see cref="Hasher"/> class.
 /// </summary>
 public Hasher()
 {
     this.HashingAlgorithm = CryptographicHashAlgorithmType.Sha256;
 }