Encrypt SHA256 : SHA1Managed « Security « C# / C Sharp

Encrypt SHA256

// <copyright file="CryptoUtil.cs" company="Pyramid Consulting">
//     Copyright (c) Pyramid Consulting. All rights reserved.
//  khoa.tran - 15-Dec-2007
// </copyright>
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;

namespace Bamboo.Core.Common.Crypto
    public class CryptoUtil
        public static byte[] EncryptSHA256(string text)
            SHA256 sha256 = SHA256.Create();
            UTF8Encoding encoding = new UTF8Encoding();
            return sha256.ComputeHash(encoding.GetBytes(text));


Related examples in the same category

1.new SHA1Managed()
2.Encrypt SHA1
3.Returns a SHA1 hash of a given plaintext
4.SHA256 crypt
5.Marshal Str
6.Get SHA1 for a string
7.Get SHA256 for a string
8.Get SHA38 for a string
9.Get SHA512 for a string
10.Encrypts a string using the SHA256 algorithm.