Exemplo n.º 1
0
        public Document(IAes aes, ISecureHash hash, ICompression compression, IPassword password, IFileProxy fileProxy)
        {
            if (aes == null)
            {
                throw new ArgumentNullException(nameof(aes));
            }

            if (hash == null)
            {
                throw new ArgumentNullException(nameof(hash));
            }

            if (compression == null)
            {
                throw new ArgumentNullException(nameof(compression));
            }

            if (password == null)
            {
                throw new ArgumentNullException(nameof(password));
            }

            if (fileProxy == null)
            {
                throw new ArgumentNullException(nameof(fileProxy));
            }

            _aes = aes;
            SecureHashProvider  = hash;
            CompressionProvider = compression;
            _password           = password;
            _fileProxy          = fileProxy;
        }
Exemplo n.º 2
0
 private static void TestStubsForDocument(out IAes aes, out ISecureHash hash, out IPassword password, out IFileProxy fileProxy, out ICompression compression)
 {
     aes         = new TestAES();
     hash        = new TestSecureHash();
     password    = new Password("password", "password");
     fileProxy   = new TestFileProxy();
     compression = new TestCompression();
 }
Exemplo n.º 3
0
        public FileLoaderBase(IPassword password)
        {
            if (password == null)
            {
                throw new ArgumentNullException(nameof(password));
            }

            Aes         = new Aes();
            SecureHash  = new SecureHash();
            Password    = password;
            Compression = new GZipCompression();
        }
Exemplo n.º 4
0
        public Version10Loader(IPassword password)
        {
            if (password == null)
            {
                throw new ArgumentNullException(nameof(password));
            }

            _aes         = new Aes();
            _secureHash  = new SecureHash();
            _password    = password;
            _compression = new GZipCompression();
        }
Exemplo n.º 5
0
 internal SecureManager()
 {
     secureHash          = new SecureHash();
     secureAesCrypto     = new SecureAesCrypto();
     secureAesHmacCrypto = new SecureAesHmacCrypto();
 }
Exemplo n.º 6
0
 public DocumentOverload(IAes aes, ISecureHash secureHash, ICompression compression, IPassword password, IFileProxy fileProxy)
     : base(aes, secureHash, compression, password, fileProxy)
 {
 }