Brutuslib - synchronous encryption library (FREEWARE)    


string brutus_encode ( message string, key string )

Encrypt message message with key key.
Returns -1 if key length is not in interval from 4 to 65 000. Returns -2 if key length is not divided by 4.
Returns encrypted string if successfull.



string brutus_decode ( message string, key string )

Decrypt message message with key key.
Returns -1 if key length is not in interval from 4 to 65 000. Returns -2 if key length is not divided by 4.
Returns decrypted string if successfull.



int brutus_check_key ( length int )

Check if length corresponds to key prerequisities. It is used by other functions.
Returns -1 if length is not in interval from 4 to 65 000. Returns -2 if length is not divided by 4.
Returns 0 if successfull.



string brutus_generate_rand_str ( length int )

Returns randomly generated string with length length.