org.kde.koala
public class KMD5 extends Object implements QtSupport
String test1; KMD5.Digest rawResult; test1 = "This is a simple test."; KMD5 context (test1); cout << "Hex Digest output: " << context.hexDigest().data() << endl;To cut down on the unnecessary overhead of creating multiple KMD5 objects, you can simply invoke reset() to reuse the same object in making another calculation:
context.reset (); context.update ("TWO"); context.update ("THREE"); cout << "Hex Digest output: " << context.hexDigest().data() << endl;
UNKNOWN: An adapted C++ implementation of RSA Data Securities MD5 algorithm.
Constructor Summary | |
---|---|
protected | KMD5(Class dummy) |
KMD5() | |
KMD5(String in, int len)
Constructor that updates the digest for the given string. | |
KMD5(String in) | |
KMD5(byte[] a) |
Method Summary | |
---|---|
String | base64Digest()
Returns the value of the calculated message digest in
a base64-encoded representation. |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | finalize() Deletes the wrapped C++ instance |
protected void | finalizeDigest()
finalizes the digest |
String | hexDigest()
Returns the value of the calculated message digest in
a hexadecimal representation. |
void | hexDigest(StringBuffer arg1) |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
void | reset()
Calling this function will reset the calculated message digest.
|
void | update(String in, int len)
Updates the message to be digested. |
void | update(String in) |
void | update(short in, int len) |
void | update(short in) |
void | update(byte[] in) |
boolean | update(QIODevice file) |
boolean | verify(String arg1) |
Parameters: in C string or binary data len if negative, calculates the length by using strlen on the first parameter, otherwise it trusts the given length (does not stop on NUL byte).
UNKNOWN: Constructor that updates the digest for the given string.
UNKNOWN: Same as above except it accepts a byte[] as its argument. @overload
UNKNOWN: Returns the value of the calculated message digest in a base64-encoded representation.
UNKNOWN: finalizes the digest
UNKNOWN: Returns the value of the calculated message digest in a hexadecimal representation.
UNKNOWN: @overload
UNKNOWN: Calling this function will reset the calculated message digest.
Parameters: in message to be added to digest len the length of the given message.
UNKNOWN: Updates the message to be digested.
UNKNOWN: @overload
Parameters: in message to be added to the digest (byte[]).
UNKNOWN: @overload
Parameters: file a pointer to FILE as returned by calls like f{d,re}open
Returns: false if an error occurred during reading.
UNKNOWN: reads the data from an I/O device, i.e. from a file (QFile). NOTE that the file must be open for reading. @overload
UNKNOWN: @overload