示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CryptoSym"/> class.
 /// </summary>
 /// <param name="key">The encryption key to use.</param>
 /// <param name="algorithm">The crypto algorithm to use</param>
 public CryptoSym(string key, SymmetricAlgorithm algorithm)
 {
     _encryptionOptions = new CryptoConfig(true, key);
     _algorithm         = algorithm;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CryptoSym"/> class.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="algorithm">The crypto algorithm to use</param>
 public CryptoSym(CryptoConfig options, SymmetricAlgorithm algorithm)
 {
     _encryptionOptions = options;
     _algorithm         = algorithm;
 }
示例#3
0
 /// <summary>
 /// Initialize with the encryptionKey
 /// </summary>
 /// <param name="key"></param>
 public CryptoSym(string key)
 {
     _encryptionOptions = new CryptoConfig(true, key);
     _algorithm         = CryptographyUtils.CreateSymmAlgoTripleDes();
 }