Data Types C#

using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
public class CryptoUtility
{
    private static string BinToHex(byte[] data)
    {
        if (!(data == null))
        {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i <= data.Length; i++)
            {
                sb.Append(data[i].ToString("X2"));
            }
            return sb.ToString();
        }
        else
        {
            return null;
        }
    }
}