Esempio n. 1
0
 /// <summary>
 /// For XML serialization
 /// </summary>
 protected EncryptedPasswordHost()
 {
     // This is to get around the issue where during de-serialization we cannot create an EncryptedString because there is no access to a repository.
     // If there is not a valid _encryptedString then de-serialization will fail (_encryptedString.Value is needed).
     // This provides an implementation of IEncryptedString which is only valid for deserializing the encrypted password from an XML representation and providing the encrypted password to a 'real' EncryptedPasswordHost
     _encryptedString = new FakeEncryptedString();
 }
Esempio n. 2
0
 /// <summary>
 /// Prepares the object for decrypting/encrypting passwords based on the <see cref="Repositories.Managers.PasswordEncryptionKeyLocation"/>
 /// </summary>
 /// <param name="repository"></param>
 public EncryptedPasswordHost(ICatalogueRepository repository)
 {
     _encryptedString = new EncryptedString(repository);
 }