/// <summary> /// Gets the decrypting stream. /// </summary> /// <param name="output">The output.</param> /// <returns></returns> public override FinishingStream GetDecryptingStream(Stream output, Keyczar.KeyczarBase keyczar) { var alg = new AesManaged { Mode = GetMode(), Key = AesKeyBytes, Padding = PaddingMode.PKCS7, BlockSize = BlockLength * 8 }; return(new DotNetSymmetricStream(alg, output, HmacKey.Maybe(h => h.HashLength, () => 0), encrypt: false)); }
/// <summary> /// Gets the encrypting stream. /// </summary> /// <param name="output">The output.</param> /// <returns></returns> public override FinishingStream GetEncryptingStream(Stream output, Keyczar.KeyczarBase keyczar) { var alg = new AesManaged { Mode = GetMode(), Key = AesKeyBytes, Padding = PaddingMode.PKCS7, BlockSize = BlockLength * 8 }; alg.GenerateIV(); int hashlength = HmacKey.Maybe(h => h.HashLength, () => 0); return(new DotNetSymmetricStream(alg, output, hashlength, encrypt: true)); }
/// <summary> /// Initializes a new instance of the <see cref="TimeoutSignerHelper"/> class. /// </summary> /// <param name="keySet">The key set.</param> public TimeoutSignerHelper(IKeySet keySet, KeyczarBase parent) : base(keySet) { _parent = parent; }
/// <summary> /// Initializes a new instance of the <see cref="HelperAttachedVerify"/> class. /// </summary> /// <param name="keySet">The key set.</param> public HelperAttachedVerify(IKeySet keySet, KeyczarBase parent) : base(keySet) { _parent = parent; }
/// <summary> /// Initializes a new instance of the <see cref="AttachedSignerHelper"/> class. /// </summary> /// <param name="keySet">The key set.</param> /// <param name="parent"></param> public AttachedSignerHelper(IKeySet keySet, KeyczarBase parent) : base(keySet) { _parent = parent; }