init commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
namespace Org.BouncyCastle.Crypto.Parameters;
|
||||
|
||||
public class AeadParameters : ICipherParameters
|
||||
{
|
||||
private readonly byte[] associatedText;
|
||||
|
||||
private readonly byte[] nonce;
|
||||
|
||||
private readonly KeyParameter key;
|
||||
|
||||
private readonly int macSize;
|
||||
|
||||
public virtual KeyParameter Key => key;
|
||||
|
||||
public virtual int MacSize => macSize;
|
||||
|
||||
public AeadParameters(KeyParameter key, int macSize, byte[] nonce)
|
||||
: this(key, macSize, nonce, null)
|
||||
{
|
||||
}
|
||||
|
||||
public AeadParameters(KeyParameter key, int macSize, byte[] nonce, byte[] associatedText)
|
||||
{
|
||||
this.key = key;
|
||||
this.nonce = nonce;
|
||||
this.macSize = macSize;
|
||||
this.associatedText = associatedText;
|
||||
}
|
||||
|
||||
public virtual byte[] GetAssociatedText()
|
||||
{
|
||||
return associatedText;
|
||||
}
|
||||
|
||||
public virtual byte[] GetNonce()
|
||||
{
|
||||
return nonce;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user