Files
SuperVPN/output/Libraries/BouncyCastle.Crypto/Org/BouncyCastle/Crypto/Parameters/AeadParameters.cs
2025-10-09 09:57:24 +09:00

40 lines
772 B
C#

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;
}
}