mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 20:00:58 +01:00
using secure memory where applicable using sodium_malloc or sodium_mlock, where not
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
int main() {
|
||||
sodium_init();
|
||||
unsigned char *t = ucmalloc(12);
|
||||
if(pcp_sodium_verify_box(&t, cipher, cipher_len, nonce, secret_b, public_a) == 0) {
|
||||
if(crypto_box_open_easy(t, cipher, cipher_len, nonce, public_a, secret_b) == 0) {
|
||||
if(memcmp(t, message, message_len) == 0) {
|
||||
printf("ok\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user