diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-01-02 10:46:09 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-01-02 10:46:09 +0000 |
commit | 591a850864d21eb30150ff98eb83cf715172ce58 (patch) | |
tree | 05aaec63b8984f3d8dcc22364b716353b7e07383 /lib/gnutls_srp.c | |
parent | 1bca4ae22584ed1498b7b93b418156dcaa55e88a (diff) | |
download | gnutls-591a850864d21eb30150ff98eb83cf715172ce58.tar.gz |
Cleanups in the digest code (separated from HMAC).
Added gnutls_fingerprint_calc(), which calculates a fingerprint.
Diffstat (limited to 'lib/gnutls_srp.c')
-rw-r--r-- | lib/gnutls_srp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gnutls_srp.c b/lib/gnutls_srp.c index 02afdbf3bd..f8e5c0a426 100644 --- a/lib/gnutls_srp.c +++ b/lib/gnutls_srp.c @@ -122,7 +122,7 @@ MPI _gnutls_calc_srp_u(MPI B) { int b_size; opaque *b_holder, hd[MAX_HASH_SIZE]; - GNUTLS_MAC_HANDLE td; + GNUTLS_HASH_HANDLE td; uint32 u; MPI ret; @@ -133,7 +133,7 @@ MPI _gnutls_calc_srp_u(MPI B) _gnutls_mpi_print( b_holder, &b_size, B); - td = gnutls_hash_init(GNUTLS_MAC_SHA); + td = gnutls_hash_init(GNUTLS_DIG_SHA); if (td==NULL) { gnutls_free(b_holder); gnutls_assert(); @@ -226,12 +226,12 @@ MPI _gnutls_calc_srp_A(MPI * a, MPI g, MPI n) int _gnutls_calc_srp_sha(char *username, char *password, opaque * salt, int salt_size, int *size, void* digest) { - GNUTLS_MAC_HANDLE td; + GNUTLS_HASH_HANDLE td; opaque res[MAX_HASH_SIZE]; *size = 20; - td = gnutls_hash_init(GNUTLS_MAC_SHA); + td = gnutls_hash_init(GNUTLS_DIG_SHA); if (td==NULL) { return GNUTLS_E_MEMORY_ERROR; } @@ -241,7 +241,7 @@ int _gnutls_calc_srp_sha(char *username, char *password, opaque * salt, gnutls_hash_deinit(td, res); - td = gnutls_hash_init(GNUTLS_MAC_SHA); + td = gnutls_hash_init(GNUTLS_DIG_SHA); if (td==NULL) { return GNUTLS_E_MEMORY_ERROR; } |