Computes the MD5 checksum for the bytes. - CSharp System.Security.Cryptography

CSharp examples for System.Security.Cryptography:MD5

Description

Computes the MD5 checksum for the bytes.

Demo Code


using System.Security.Cryptography;
using System;/* ww  w  . jav  a2s  .c  o  m*/

public class Main{
        /// <summary>
        /// Computes the MD5 checksum for the bytes.
        /// </summary>
        public static Byte[] Compute(Byte[] bytes)
        {
            MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
            return md5.ComputeHash(bytes);
        }
}

Related Tutorials