Example #1
0
        public void Decrypt(SCMS.Foundation.Security.SymmetricCipherProvider symmetricCipherProvider)
        {
            if (symmetricCipherProvider == null)
            {
                throw new Exception("The provided symmetric cipher provider is not instantiated.", new ArgumentNullException("symmetricCipherProvider"));
            }

            UserIS     = string.IsNullOrEmpty(UserIS) ? string.Empty : symmetricCipherProvider.DecryptData(UserIS);
            Identifier = string.IsNullOrEmpty(Identifier) ? string.Empty : symmetricCipherProvider.DecryptData(Identifier);
        }
Example #2
0
        public void Decrypt(SCMS.Foundation.Security.SymmetricCipherProvider symmetricCipherProvider)
        {
            if (symmetricCipherProvider == null)
            {
                throw new Exception("The provided symmetric cipher provider is not instantiated.", new ArgumentNullException("symmetricCipherProvider"));
            }

            Supervisor.Person = new Entity.Person(Supervisor.Person, SCMS.Foundation.Security.EncryptionStatus.EncryptionStatusDecrypted, symmetricCipherProvider);
            Person            = new Entity.Person(Person, SCMS.Foundation.Security.EncryptionStatus.EncryptionStatusDecrypted, symmetricCipherProvider);
        }
Example #3
0
        public void Decrypt(SCMS.Foundation.Security.SymmetricCipherProvider symmetricCipherProvider)
        {
            if (symmetricCipherProvider == null)
            {
                throw new Exception("The provided symmetric cipher provider is not instantiated.", new ArgumentNullException("symmetricCipherProvider"));
            }

            Identification = string.IsNullOrEmpty(Identification) ? string.Empty : symmetricCipherProvider.DecryptData(Identification);
            Name           = string.IsNullOrEmpty(Name) ? string.Empty : symmetricCipherProvider.DecryptData(Name);
            MiddleName     = string.IsNullOrEmpty(MiddleName) ? string.Empty : symmetricCipherProvider.DecryptData(MiddleName);
            LastName       = string.IsNullOrEmpty(LastName) ? string.Empty : symmetricCipherProvider.DecryptData(LastName);
            Gender         = string.IsNullOrEmpty(Gender) ? string.Empty : symmetricCipherProvider.DecryptData(Gender);
            From           = string.IsNullOrEmpty(Gender) ? string.Empty : symmetricCipherProvider.DecryptData(From);
        }
Example #4
0
        public void Decrypt(SCMS.Foundation.Security.SymmetricCipherProvider symmetricCipherProvider)
        {
            if (symmetricCipherProvider == null)
            {
                throw new Exception("The provided symmetric cipher provider is not instantiated.", new ArgumentNullException("symmetricCipherProvider"));
            }

            Person      = new Entity.Person(Person, SCMS.Foundation.Security.EncryptionStatus.EncryptionStatusDecrypted, symmetricCipherProvider);
            Country     = string.IsNullOrEmpty(Country) ? string.Empty : symmetricCipherProvider.DecryptData(Country);
            Subdivision = string.IsNullOrEmpty(Subdivision) ? string.Empty : symmetricCipherProvider.DecryptData(Subdivision);
            City        = string.IsNullOrEmpty(City) ? string.Empty : symmetricCipherProvider.DecryptData(City);
            Address     = string.IsNullOrEmpty(Address) ? string.Empty : symmetricCipherProvider.DecryptData(Address);
            ZIP         = string.IsNullOrEmpty(ZIP) ? string.Empty : symmetricCipherProvider.DecryptData(ZIP);
            Phones      = Phones == null ? null : Phones.Select(p => string.IsNullOrEmpty(p) ? string.Empty : symmetricCipherProvider.DecryptData(p)).ToList();
        }