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.

uint32 C.encode memory chunk(const char ∗ in buf , uint32 in len, char ∗ out buf ,<br />

uint32 out len)<br />

encodes the memory chunk starting at in buf with<br />

size in len into the buffer starting at out buf with size<br />

out len. <strong>The</strong> function returns actual length of the<br />

encoded chunk which may be smaller than out len. If<br />

the output buffer is too small for the encoded data<br />

the failure flag will be set (see below). Note: <strong>The</strong><br />

output data is slightly longer than the input data due<br />

to padding and header data.<br />

uint32 C.decode memory chunk(const char ∗ in buf , uint32 in len, char ∗ out buf ,<br />

uint32 out len)<br />

decodes a memory chunk. <strong>The</strong> meaning of the parameters<br />

and the return value is the same as in the<br />

previous function.<br />

streambuf ∗ C.get src stream( ) returns the current source stream.<br />

void<br />

C.set src stream(streambuf ∗ src stream, bool own stream = false)<br />

sets the source stream (cf. constructor).<br />

void C.set src file(const char ∗ file name)<br />

sets a file as source stream.<br />

streambuf ∗ C.get tgt stream( ) returns the current target stream.<br />

void<br />

void<br />

void<br />

C.set tgt stream(streambuf ∗ tgt stream, bool own Stream = false)<br />

C.set tgt file(const char ∗ file name)<br />

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

sets the target stream (cf. constructor).<br />

sets a file as target stream.<br />

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

If keep key is false the key is set to the empty key. In<br />

any case the initialization vector is set to nil.<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.

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

Saved successfully!

Ooh no, something went wrong!