31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

void<br />

C.reset(bool keep parameters = true)<br />

puts C in the same state as the default constructor.<br />

If keep parameters is false the parameters are set to<br />

their default values and the key is set to the empty<br />

key.<br />

bool C.failed( ) returns true if an error occured.<br />

bool C.finished( ) returns true if the coding is finished.<br />

string C.get description( ) provides a description for C.<br />

Additional Operations<br />

uint16 C.get default key size( )<br />

returns the default key size.<br />

uint16<br />

void<br />

C.get accepted key size(uint16 & min, uint16 & max)<br />

C.set key(const CryptKey& key)<br />

provides the minimum and maximum key size (in<br />

bytes). <strong>The</strong> return value is the default key size.<br />

sets the key.<br />

bool C.has key( ) queries whether a key has been set.<br />

CryptKey C.get key( ) returns the current key.<br />

const byte∗ C.check( ) checks the source stream and returns the computed<br />

MAC. No target stream needs to be set. (If a target<br />

stream is set check coincides with decode).<br />

bool C.MAC is valid( ) returns whether C has a valid MAC.<br />

string C.get MAC as hex string( )<br />

returns the MAC for the stream that has been processed<br />

last as hexadecimal string.<br />

const byte∗<br />

void<br />

C.compute MAC(string str)<br />

computes a MAC for a string. (Sets source and target<br />

stream to nil.)<br />

C.set MAC in stream flag(bool mac in stream)<br />

sets the MAC in stream flag.<br />

bool C.get MAC in stream flag( )<br />

returns the MAC in stream flag.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!