Crypto Lua Module

From Hopmod Wiki

Jump to: navigation, search

crypto.md5sum(string)

Return the hash value of string.

crypto.sauerecc.answer_challenge(privateKeyString, challengeString)

Answer the challenge using the private key given and return the answer as a string.

crypto.sauerecc.generate_key_pair()

Return a randomly generated key pair. The first key return value is a private key as a string. The second return value a public key as a key object.

crypto.sauerecc.key(string)

Construct key object from public key string.

challenge:expected_answer(string)

Returns true if the string argument equals the expected answer.

challenge:to_string()

Return the challenge in string form.

key:generate_challenge()

Generate a challenge from a random seed and the key value and return the created challenge object.

key:to_string()

Return the key in string form.

crypto.tigersum(string)

Return the hash value of string.