/// <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; }
/// <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; }
/// <summary> /// Initialize with the encryptionKey /// </summary> /// <param name="key"></param> public CryptoSym(string key) { _encryptionOptions = new CryptoConfig(true, key); _algorithm = CryptographyUtils.CreateSymmAlgoTripleDes(); }