Exemple #1
0
        /// <summary>
        /// Hashes SecureString and returns it as string.
        /// </summary>
        /// <param name="secureString">The SecureString to hash.</param>
        /// <returns>Hashed SecureString's value.</returns>
        public static string HashValue(this SecureString secureString)
        {
            var bytes        = secureString.ConvertToBytes();
            var hashedString = CryptographyUtility.HashBytes(bytes);

            Array.Clear(bytes, 0, bytes.Length);

            return(hashedString);
        }