You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.0 KiB
45 lines
1.0 KiB
8 months ago
|
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||
|
#pragma warning disable
|
||
|
using System;
|
||
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||
|
|
||
|
namespace BestHTTP.SecureProtocol.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; }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
#pragma warning restore
|
||
|
#endif
|