mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
bignum: Harmonize ssh_get_random()
Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
7b9a07c363
commit
36a727e656
@@ -50,7 +50,18 @@ static int alloc_key(struct ssh_cipher_struct *cipher) {
|
||||
}
|
||||
|
||||
void ssh_reseed(void){
|
||||
}
|
||||
}
|
||||
|
||||
int ssh_get_random(void *where, int len, int strong)
|
||||
{
|
||||
/* variable not used in gcrypt */
|
||||
(void) strong;
|
||||
|
||||
/* not using GCRY_VERY_STRONG_RANDOM which is a bit overkill */
|
||||
gcry_randomize(where,len,GCRY_STRONG_RANDOM);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
SHACTX sha1_init(void) {
|
||||
SHACTX ctx = NULL;
|
||||
|
||||
Reference in New Issue
Block a user