コード例 #1
0
        /// <summary>
        /// Gets SHA3 key for authentication
        /// </summary>
        /// <param name="value">Value used to generate a key</param>
        /// <returns>(<see cref="string"/>) SHA3 key</returns>
        private static string ToSha3Hash(string value)
        {
            var keccak = new Keccak(1600);
            var temp   = BitConverter.ToString(Encoding.UTF8.GetBytes(value).ToArray())
                         .Replace("-", string.Empty);

            return(keccak.GetHash(temp, 1088, 512, 32).ToLower());
        }