Ejemplo n.º 1
0
        public static string EncryptCredentials(Base64Credential credentials)
        {
            string username = credentials.Username;
            string password = credentials.Password;

            return(EncryptCredentials(username, password));
        }
Ejemplo n.º 2
0
        public static Base64Credential DecryptCredentials(string base64Value)
        {
            var    credentials = Decrypt(base64Value);
            var    split       = credentials.Split(':');
            string username    = split[0];
            string password    = split[1];
            var    result      = new Base64Credential
            {
                Username = username,
                Password = password
            };

            return(result);
        }
Ejemplo n.º 3
0
 public static string ToEncryptedBase64String(this Base64Credential source)
 {
     return(Base64.EncryptCredentials(source));
 }