Esempio n. 1
0
        private CredentialCookie deserialize_cookie(string value)
        {
            var cryptography    = new O7Cryptography(Constant.CRYPTO_KEY);
            var dencryptedValue = cryptography.Decrypt(value);

            return(O7JsonSerealizer.Deserialize <CredentialCookie>(dencryptedValue));
        }
Esempio n. 2
0
        private string serialize_cookie(string login, string password, string companyId, string branchId, string name)
        {
            var cookieValue     = new CredentialCookie(login, password, companyId, branchId, name);
            var serializedValue = O7JsonSerealizer.Serialize(cookieValue);

            var cryptography = new O7Cryptography(Constant.CRYPTO_KEY);

            return(cryptography.Encrypt(serializedValue));
        }
Esempio n. 3
0
 public SecurityController()
 {
     _cryptography = new O7Cryptography(Constant.CRYPTO_KEY);
 }