blob: f757266001d3e13d2697bd93a90be0240fe3f55d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
using System;
using Org.BouncyCastle.Utilities;
namespace Org.BouncyCastle.Crypto.Parameters
{
/// <summary>
/// Parameters for tweakable block ciphers.
/// </summary>
public class TweakableBlockCipherParameters
: ICipherParameters
{
private readonly byte[] tweak;
private readonly KeyParameter key;
public TweakableBlockCipherParameters(KeyParameter key, byte[] tweak)
{
this.key = key;
this.tweak = Arrays.Clone(tweak);
}
/// <summary>
/// Gets the key.
/// </summary>
/// <value>the key to use, or <code>null</code> to use the current key.</value>
public KeyParameter Key
{
get { return key; }
}
/// <summary>
/// Gets the tweak value.
/// </summary>
/// <value>The tweak to use, or <code>null</code> to use the current tweak.</value>
public byte[] Tweak
{
get { return tweak; }
}
}
}
|