/// <summary>
 ///     Create printing model for symmetric encryption.
 /// </summary>
 /// <param name="initializationVector">Initialization vector.</param>
 /// <param name="key">Encryption key.</param>
 /// <param name="phrase">The phrase to encrypt/decrypt.</param>
 /// <param name="cipherType">Cipher type.</param>
 /// <param name="returnedDataFormat">Data format of returned values.</param>
 public SymmetricCryptographyCliOutput(
     string initializationVector,
     string key,
     string phrase,
     SymmetricCipherType cipherType,
     EncryptedTextReturnOptions returnedDataFormat)
     : this(key, phrase, cipherType, returnedDataFormat)
 {
     IV = initializationVector;
 }
 /// <summary>
 ///     Create printing model for symmetric encryption.
 /// </summary>
 /// <param name="initializationVector">Initialization vector.</param>
 /// <param name="key">Encryption key.</param>
 /// <param name="phrase">The phrase to encrypt/decrypt.</param>
 /// <param name="cipherType">Cipher type.</param>
 public SymmetricCryptographyCliOutput(
     byte[] key,
     byte[] encryptedPhrase,
     SymmetricCipherType cipherType) : this(
         Convert.ToBase64String(key),
         Convert.ToBase64String(encryptedPhrase),
         cipherType,
         EncryptedTextReturnOptions.Base64String)
 {
 }
 /// <summary>
 ///     Create printing model for symmetric encryption.
 /// </summary>
 /// <param name="key">Encryption key.</param>
 /// <param name="phrase">The phrase to encrypt/decrypt.</param>
 /// <param name="cipherType">Cipher type.</param>
 /// <param name="returnedDataFormat">Data format of returned values.</param>
 public SymmetricCryptographyCliOutput(
     string key,
     string phrase,
     SymmetricCipherType cipherType,
     EncryptedTextReturnOptions returnedDataFormat)
 {
     Key     = key;
     Phrase  = phrase;
     Encoded = returnedDataFormat.ToString();
     Method  = cipherType.ToString();
 }
Exemplo n.º 4
0
 public TDes128ECB()
 {
     CipherType = new SymmetricCipherType(128, CryptographyStandard.TripleDes, CipherMode.ECB);
 }
Exemplo n.º 5
0
 public TDes192CBC()
 {
     CipherType = new SymmetricCipherType(192, CryptographyStandard.TripleDes, CipherMode.CBC);
 }
Exemplo n.º 6
0
 public Aes192ECB()
 {
     CipherType = new SymmetricCipherType(192, CryptographyStandard.Aes, CipherMode.ECB);
 }
Exemplo n.º 7
0
 public Aes128CBC()
 {
     CipherType = new SymmetricCipherType(128, CryptographyStandard.Aes, CipherMode.CBC);
 }