public EncryptingValueConverter( IValueConverter decoratedValueConverter, IEncryptionAlgorithmFactory encryptionAlgorithmFactory) { _decoratedValueConverter = decoratedValueConverter; _encryptionAlgorithm = encryptionAlgorithmFactory.GetAlgorithm(decoratedValueConverter.Type); }
public EncryptingValueConverter( IValueConverter decoratedValueConverter, IEncryptionAlgorithmFactory encryptionAlgorithmFactory) { _decoratedValueConverter = decoratedValueConverter; _encryptionAlgorithm = encryptionAlgorithmFactory.GetAlgorithm(decoratedValueConverter.Type); }
public void SetUp() { _rijndaelAlgo = new RijndaelAlgorithm(); _tripleDesAlgo = new TripleDesAlgorithm(); _keyFactoryRijndael = new EncryptionKeyIvFactory(new RijndaelAlgorithm()); _keyFactoryTripleDes = new EncryptionKeyIvFactory(new TripleDesAlgorithm()); }
public IServiceBusConfigurationBuilder AddEnryptionAlgorithm(IEncryptionAlgorithm algorithm) { Guard.AgainstNull(algorithm, "algorithm"); configuration.AddEncryptionAlgorithm(algorithm); return this; }
public CryptoService(ICryptoStore store, IHashAlgorithm hashAlgorithm, IEncryptionAlgorithm encryptionAlgorithm, IUserBasedDataProtection userBasedDataProtection) { _store = store; _hashAlgorithm = hashAlgorithm; _encryptionAlgorithm = encryptionAlgorithm; _userBasedDataProtection = userBasedDataProtection; }
public DefaultConfigurator AddEnryptionAlgorithm(IEncryptionAlgorithm algorithm) { Guard.AgainstNull(algorithm, "algorithm"); _configuration.AddEncryptionAlgorithm(algorithm); return(this); }
public ServiceBusConfigurator AddEnryptionAlgorithm(IEncryptionAlgorithm algorithm) { Guard.AgainstNull(algorithm, "algorithm"); configuration.AddEncryptionAlgorithm(algorithm); return(this); }
public DefaultConfigurator AddEnryptionAlgorithm(IEncryptionAlgorithm algorithm) { Guard.AgainstNull(algorithm, "algorithm"); _configuration.AddEncryptionAlgorithm(algorithm); return this; }
private void btnEncrypt_Click(object sender, EventArgs e) { InputText = txtEncryptInputContent.Text; Key = txtKey.Text; if (string.IsNullOrEmpty(InputText) || string.IsNullOrEmpty(Key)) { MessageBox.Show("Şifrelemek için metin ve anahtar girmek zorunludur."); return; } algorithm = new VigenereCipher(InputText, Key); txtEncryptOutContent.Text = algorithm.Encrypt(); }
public void SetAlgorithm(Algorithm alGore) { switch (alGore) { case Algorithm.ROT13: encryptor = new ROT13(); break; case Algorithm.StringReverse: encryptor = new StringReverse(); break; } }
public HillTests() { matrix = new int[3, 3]; matrix[0, 0] = 17; matrix[0, 1] = 21; matrix[0, 2] = 2; matrix[1, 0] = 17; matrix[1, 1] = 18; matrix[1, 2] = 2; matrix[2, 0] = 5; matrix[2, 1] = 21; matrix[2, 2] = 19; _target = new Hill(matrix); }
public static IEncryptionAlgorithm Create(EncryptionAlgorithm algoType) { IEncryptionAlgorithm encryptionInstance = null; switch (algoType) { case EncryptionAlgorithm.AES: encryptionInstance = new Encryption.AES(); break; case EncryptionAlgorithm.Rijndael: encryptionInstance = new Encryption.Rijndael(); break; default: throw new Exception("Incorrect use of EncryptionAlgoritm factory"); } return(encryptionInstance); }
protected EncryptionService CreateSut(IEncryptionAlgorithm algorithm, EncryptionKeyIv key) { return(new EncryptionService(algorithm, key)); }
static void ExecutePlugin(IEncryptionAlgorithm algorithm) { ConsoleEncrypter consoleEncrypter = new ConsoleEncrypter(algorithm); consoleEncrypter.GetAndEncryptInput(); }
/// <summary> /// Initializes a new instance of the <see cref="T:ByteDev.Crypto.Encryption.EncryptionService" /> class. /// </summary> /// <param name="encryptionAlgorithm">Encryption algorithm to use when encrypting and decrypting.</param> /// <param name="keyIv">The key and initialization vector to use when encrypting and decrypting.</param> /// <exception cref="T:System.ArgumentNullException"><paramref name="encryptionAlgorithm" /> is null.</exception> /// <exception cref="T:System.ArgumentNullException"><paramref name="keyIv" /> is null.</exception> public EncryptionService(IEncryptionAlgorithm encryptionAlgorithm, EncryptionKeyIv keyIv) { _encryptionAlgorithm = encryptionAlgorithm ?? throw new ArgumentNullException(nameof(encryptionAlgorithm)); _keyIv = keyIv ?? throw new ArgumentNullException(nameof(keyIv)); _encoderFactory = new EncoderFactory(); }
public Decrypter(IEncryptionAlgorithm cipher, IKeyring keyring) { _cipher = cipher; _keyring = keyring; }
public ConsoleEncrypter(IEncryptionAlgorithm encryptionAlgorithm) { this.encryptionAlgorithm = encryptionAlgorithm; }
/// <summary> /// Initializes a new instance of the <see cref="T:ByteDev.Crypto.Encryption.KeyIv.EncryptionKeyIvFactory" /> class. /// </summary> /// <param name="algorithm">Algorithm to use when encrypting.</param> public EncryptionKeyIvFactory(IEncryptionAlgorithm algorithm) { _algorithm = algorithm; }
public RailFenceTests() { _target = new RailFence(2); }
public void AddEncryptionAlgorithm(IEncryptionAlgorithm algorithm) { Guard.AgainstNull(algorithm, "algorithm"); _encryptionAlgorithms.Add(algorithm); }
public Aes256CbcHmacSha256Provider(IKeyring keyring, IEncryptionAlgorithm cipher) { _keyring = keyring; _cipher = cipher; }
public CeaserTests() { _target = new Ceaser(3); }
public AutpService(IEncryptionAlgorithm encryptionAlgorithm) { this.encryptionAlgorithm = encryptionAlgorithm; }
public EncryptionService() { _encryptionAlgorithm = new DefaultEncryptionAlgorithm(); }
public Encrypter(IEncryptionAlgorithm cipher, IKey key) { _cipher = cipher; _key = key; }
public void AddEncryptionAlgorithm(IEncryptionAlgorithm algorithm) { Guard.AgainstNull(algorithm, nameof(algorithm)); _encryptionAlgorithms.Add(algorithm); }
public LegacyRsaDecrypter(IKeyring keyring, IEncryptionAlgorithm cipher) { _keyring = keyring; _cipher = cipher; }
public AeadAes256CbcHmacSha512Provider(IEncryptionAlgorithm cipher, IKeyring keyring) { _cipher = cipher; _keyring = keyring; }
public PlayFairTests() { _target = new PlayFair("playfairexample"); }
public void AddEncryptionAlgorithm(IEncryptionAlgorithm algorithm) { Guard.AgainstNull(algorithm, "algorithm"); encryptionAlgorithms.Add(algorithm); }
public RowTranspositionTests() { _target = new RowTransposition(new int[] { 4, 3, 1, 2, 5, 6, 7 }); }
public EncryptionService(IEncryptionAlgorithm encryptionAlgorithm) { _encryptionAlgorithm = encryptionAlgorithm; }