Botan

EMSA Classes

License
Botan is released under the Simplified BSD License (see LICENSE.md)

interface  EMSA;

Encoding Method for Signatures, Appendix


abstract void  update(const(ubyte)* input, size_t length);

Add more data to the signature computation

Parameters
const(ubyte)* input some data
size_t length length of input in bytes

abstract SecureVector!ubyte  rawData();

Returns
raw hash

abstract SecureVector!ubyte  encodingOf(ref const SecureVector!ubyte msg, size_t output_bits, RandomNumberGenerator rng);
final SecureVector!ubyte  encodingOf(const SecureVector!ubyte msg, size_t output_bits, RandomNumberGenerator rng);

Return the encoding of a message

Parameters
SecureVector!ubyte msg the result of rawData()
size_t output_bits the desired output bit size
RandomNumberGenerator rng a random number generator
Returns
encoded signature

abstract bool  verify(ref const SecureVector!ubyte coded, ref const SecureVector!ubyte raw, size_t key_bits);

Verify the encoding

Parameters
SecureVector!ubyte coded the received (coded) message representative
SecureVector!ubyte raw the computed (local, uncoded) message representative
size_t key_bits the size of the key in bits
Returns
true if coded is a valid encoding of raw, otherwise false