1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
unsigned char* stretchPasswordArgon(const char *password, unsigned char *salt, unsigned* oplimit, unsigned* memlimit) {
if (sodium_is_zero(salt, CRYPTO_SALT_BYTES) && random_bytes(salt, CRYPTO_SALT_BYTES)) {
return NULL;
}
unsigned char* key = malloc(CRYPTO_ARGON_OUT_SIZE);
if (!*oplimit) {
*oplimit = crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE;
}
if (!*memlimit) {
*memlimit = crypto_pwhash_MEMLIMIT_MIN;
}
if (crypto_pwhash(key, CRYPTO_ARGON_OUT_SIZE, password, str_len(password), salt, *oplimit, *memlimit, crypto_pwhash_ALG_DEFAULT)) {
LOGGING("Argon2 Failed");
*oplimit = 0;
*memlimit = 0;
CLEAN(key);
return NULL;
}
return key;
}
QuoteReturns Data::BytesLocker object.
2019-02-04T14:28:08 rostiZeig mal einen Dump von diesem Objekt. Entweder ist da der Key zu sehen oder es gibt eine Methode dazu.
myDoorBirdNetbus : DoorBird_Read - UDP key : $VAR1 = bless( do{\(my $o = undef)}, 'Data::BytesLocker' );