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.
27 lines
588 B
27 lines
588 B
using System;
|
|
|
|
namespace Org.BouncyCastle.Crypto.Operators
|
|
{
|
|
public class DefaultSignatureResult
|
|
: IBlockResult
|
|
{
|
|
private readonly ISigner mSigner;
|
|
|
|
public DefaultSignatureResult(ISigner signer)
|
|
{
|
|
this.mSigner = signer;
|
|
}
|
|
|
|
public byte[] Collect()
|
|
{
|
|
return mSigner.GenerateSignature();
|
|
}
|
|
|
|
public int Collect(byte[] sig, int sigOff)
|
|
{
|
|
byte[] signature = Collect();
|
|
signature.CopyTo(sig, sigOff);
|
|
return signature.Length;
|
|
}
|
|
}
|
|
}
|
|
|