public EncryptionToolsImpl( RandomBytesBuilder saltBuilder, SaltBasedHashBuilder hashBuilder ) { this.saltBuilderValue = new ValueAdapter <RandomBytesBuilder>(saltBuilder); this.hashBuilderValue = new ValueAdapter <SaltBasedHashBuilder>(hashBuilder); }
public EncryptionToolsImplTests() { this.saltBuilder = new RandomBytesBuilderImpl(new RNGCryptoServiceProvider()); this.hashBuilder = new SaltBasedHashBuilderImpl(); this.tools = new EncryptionToolsImpl( this.saltBuilder, this.hashBuilder ); }
public SaltBasedHashBuilderImplTests() { this.builder = new SaltBasedHashBuilderImpl(); this.length = 64; this.salt = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 }; this.iterations = 1000; this.hashAlgorithm = "SHA512"; this.original = System.Text.Encoding.UTF8.GetBytes("P@ssw0rd"); this.builder.setLength(this.length); this.builder.setIterations(this.iterations); this.builder.setHashAlgorithm(this.hashAlgorithm); this.builder.setSalt(salt); this.builder.setOriginal(original); }