mirror of
https://github.com/transmission/transmission.git
synced 2025-12-27 05:38:40 +00:00
On a way to factoring out OpenSSL support to a standalone file to ease
addition of other crypto libraries support in the future, move helpers
providing SSHA1 password generation and checking to crypto-utils.{c,h}.
This commit is contained in:
@@ -154,6 +154,17 @@ int tr_rand_int_weak (int upper_bound);
|
||||
bool tr_rand_buffer (void * buffer,
|
||||
size_t length);
|
||||
|
||||
/**
|
||||
* @brief Generate a SSHA password from its plaintext source.
|
||||
*/
|
||||
char * tr_ssha1 (const char * plain_text) TR_GNUC_MALLOC;
|
||||
|
||||
/**
|
||||
* @brief Validate a test password against the a ssha1 password.
|
||||
*/
|
||||
bool tr_ssha1_matches (const char * ssha1,
|
||||
const char * plain_text);
|
||||
|
||||
/**
|
||||
* @brief Translate a block of bytes into base64.
|
||||
* @return a newly-allocated null-terminated string that can be freed with tr_free ()
|
||||
|
||||
Reference in New Issue
Block a user