see aes256.c:aes256_configureif(!RAND_bytes(salt, sizeof(salt))) { ERROR("Can't generate salt, please try again"); return -1; }
crypt_blowfish.c:BF_encode - the whole funtion
crypt_blowfish.c:_crypt_gensalt_blowfish_rn - the whole function
libsxclient/src/misc.c:sxi_derive_key
genkey = _crypt_blowfish_rn(pass, setting, out, len); if (!genkey) return -1;
aes256.c:derive_key
if (EVP_DigestInit_ex(ctx, EVP_sha512(), NULL) != 1) {
ERROR("EVP_DigestInit_ex failed");
break;
}
if (EVP_DigestUpdate(ctx, keybuf, strlen(keybuf)) != 1) {
ERROR("EVP_DigestUpdate failed");
break;
}
if (EVP_DigestFinal_ex(ctx, key, &len) != 1) {
ERROR("EVP_DigestFinal_ex failed");
break;
}
if (len != key_size) {
ERROR("Bad digest size: %d bytes", len);
break;
}
ret = 0;
aes256.c:derive_key
/ generate a key for meta encryption from the bcrypt one / if(PKCS5_PBKDF2_HMAC(keybuf, strlen(keybuf), salt, salt_size, 1, EVP_sha512(), meta_key_size, meta_key) == 0) {```