Beispiel #1
0
        public ActionResult GenerateKey()
        {
            string guid      = Guid.NewGuid().ToString();
            string appId     = CryptographyUtils.SHA1(guid);
            string appSecret = CryptographyUtils.DesEncrypt(appId);

            //string appSecret = SHA256ManagedUtils.GetHashedPassword(guid, appId);

            return(Content(string.Format("AppID:{0}<br>AppSecret:{1}", appId, appSecret)));
        }