methodiDSIDLArith.SSASignatureGeneration
function SSASignatureGeneration(aKey : iDLPrivateKey; const aDigest : tBytes; aOffset, aCount : Integer; aHashAlgorithm: tHashAlgorithm; aNullMsg : Boolean; aDEREncode : Boolean; const aSign : tBytes; aSignOffset, aSignCount : Integer) : Integer; overload;
Generates a signature over an already-computed digest into a caller-supplied buffer (aSign at aSignOffset), returning the number of bytes written. The algorithm follows aKey.SignScheme (ECDSA/DSA/NR/EdDSA); aDEREncode chooses the ASN.1 DER SEQUENCE encoding vs the raw fixed-length P1363 encoding, and aNullMsg indicates the input is the final digest rather than a message to be hashed. This is the signer (private-key) side only.
function SSASignatureGeneration(aKey : iDLPrivateKey; aDigest : pByteArray; aCount : Integer; aHashAlgorithm: tHashAlgorithm; aNullMsg : Boolean; aDEREncode : Boolean; aSign : pByteArray; aSignCount : Integer) : Integer; overload;
pByteArray/raw-pointer variant of the digest-input signer above. Use it from code that already works with raw buffers rather than tBytes. Signer side.
function SSASignatureGeneration(aKey : iDLPrivateKey; const aDigest : tBytes; aHashAlgorithm: tHashAlgorithm; aNullMsg : Boolean; aDEREncode : Boolean; var aSign : tBytes) : Integer; overload;
Digest-input signer that allocates/grows the aSign tBytes for you (var parameter). The convenient overload when you have a digest and want the signature returned in a managed buffer. Signer side.
function SSASignatureGeneration(aKey : iDLPrivateKey; aDigest : iSecretKey; aHashAlgorithm: tHashAlgorithm; aNullMsg : Boolean; aDEREncode : Boolean; var aSign : iSecretKey) : Integer; overload;
iSecretKey-in/iSecretKey-out signer: signs a digest held in a protected secret-key buffer and returns the signature likewise. Use it when the digest is sensitive material you keep wiped. Signer side.
function SSASignatureGeneration(aKey : iDLPrivateKey; const aMsg : tBytes; aOffset, aCount : Integer; aHashAlgorithm: tHashAlgorithm; aDEREncode : Boolean; const aSign : tBytes; aSignOffset, aSignCount : Integer) : Integer; overload;
Message-input signer (no aNullMsg): hashes aMsg with aHashAlgorithm and signs the result into the caller-supplied buffer. Use this family when you have the raw message rather than a precomputed digest. Signer side.
function SSASignatureGeneration(aKey : iDLPrivateKey; aMsg : pByteArray; aCount : Integer; aHashAlgorithm: tHashAlgorithm; aDEREncode : Boolean; aSign : pByteArray; aSignCount : Integer) : Integer; overload;
pByteArray/raw-pointer message-input signer. Signer side.
function SSASignatureGeneration(aKey : iDLPrivateKey; const aMsg : tBytes; aHashAlgorithm: tHashAlgorithm; aDEREncode : Boolean; var aSign : tBytes) : Integer; overload;
Message-input signer that allocates the aSign tBytes for you (var parameter) -- the simplest sign-a-message call. Signer side.