Example #1
0
        private static string EncryptDate(string d)
        {
            byte[] bytes    = System.Text.Encoding.ASCII.GetBytes(d.ToString());
            byte[] numArray = (new SHA256Managed()).ComputeHash(bytes);
            string str      = string.Concat(d.ToString(), ";", PDFHelper.ByteArrayToString(numArray));

            byte[] bytes1   = System.Text.Encoding.ASCII.GetBytes(str);
            char[] chrArray = new char[] { '=' };
            return(Convert.ToBase64String(bytes1).TrimEnd(chrArray));
        }