コード例 #1
0
        public void Encrypt(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.EncryptData(UserIS);
            Identifier = string.IsNullOrEmpty(Identifier) ? string.Empty : symmetricCipherProvider.EncryptData(Identifier);
        }
コード例 #2
0
        public void Encrypt(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.EncryptionStatusEncrypted, symmetricCipherProvider);
            Country     = string.IsNullOrEmpty(Country) ? string.Empty : symmetricCipherProvider.EncryptData(Country);
            Subdivision = string.IsNullOrEmpty(Subdivision) ? string.Empty : symmetricCipherProvider.EncryptData(Subdivision);
            City        = string.IsNullOrEmpty(City) ? string.Empty : symmetricCipherProvider.EncryptData(City);
            Address     = string.IsNullOrEmpty(Address) ? string.Empty : symmetricCipherProvider.EncryptData(Address);
            ZIP         = string.IsNullOrEmpty(ZIP) ? string.Empty : symmetricCipherProvider.EncryptData(ZIP);
            Phones      = Phones == null ? null : Phones.Select(p => string.IsNullOrEmpty(p) ? string.Empty : symmetricCipherProvider.EncryptData(p)).ToList();
        }
コード例 #3
0
        public void Encrypt(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.EncryptData(Identification);
            Name           = string.IsNullOrEmpty(Name) ? string.Empty : symmetricCipherProvider.EncryptData(Name);
            MiddleName     = string.IsNullOrEmpty(MiddleName) ? string.Empty : symmetricCipherProvider.EncryptData(MiddleName);
            LastName       = string.IsNullOrEmpty(LastName) ? string.Empty : symmetricCipherProvider.EncryptData(LastName);
            Gender         = string.IsNullOrEmpty(Gender) ? string.Empty : symmetricCipherProvider.EncryptData(Gender);
            From           = string.IsNullOrEmpty(From) ? string.Empty : symmetricCipherProvider.EncryptData(From);
        }