Lines Matching refs:ZSTR_VAL

787 	if (crypto_shorthash((unsigned char *) ZSTR_VAL(hash), msg,  in PHP_FUNCTION()
793 ZSTR_VAL(hash)[crypto_shorthash_BYTES] = 0; in PHP_FUNCTION()
832 if (crypto_secretbox_easy((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
839 ZSTR_VAL(ciphertext)[msg_len + crypto_secretbox_MACBYTES] = 0; in PHP_FUNCTION()
878 if (crypto_secretbox_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
884 ZSTR_VAL(msg)[ciphertext_len - crypto_secretbox_MACBYTES] = 0; in PHP_FUNCTION()
917 if (crypto_generichash((unsigned char *) ZSTR_VAL(hash), (size_t) hash_len, in PHP_FUNCTION()
924 ZSTR_VAL(hash)[hash_len] = 0; in PHP_FUNCTION()
962 memcpy(ZSTR_VAL(state), &state_tmp, state_len); in PHP_FUNCTION()
964 ZSTR_VAL(state)[state_len] = 0; in PHP_FUNCTION()
1042 (unsigned char *) ZSTR_VAL(hash), in PHP_FUNCTION()
1052 ZSTR_VAL(hash)[hash_len] = 0; in PHP_FUNCTION()
1067 if (crypto_box_keypair((unsigned char *) ZSTR_VAL(keypair) + in PHP_FUNCTION()
1069 (unsigned char *) ZSTR_VAL(keypair)) != 0) { in PHP_FUNCTION()
1074 ZSTR_VAL(keypair)[keypair_len] = 0; in PHP_FUNCTION()
1099 if (crypto_box_seed_keypair((unsigned char *) ZSTR_VAL(keypair) + in PHP_FUNCTION()
1101 (unsigned char *) ZSTR_VAL(keypair), in PHP_FUNCTION()
1107 ZSTR_VAL(keypair)[keypair_len] = 0; in PHP_FUNCTION()
1141 memcpy(ZSTR_VAL(keypair), secretkey, crypto_box_SECRETKEYBYTES); in PHP_FUNCTION()
1142 memcpy(ZSTR_VAL(keypair) + crypto_box_SECRETKEYBYTES, publickey, in PHP_FUNCTION()
1144 ZSTR_VAL(keypair)[keypair_len] = 0; in PHP_FUNCTION()
1168 memcpy(ZSTR_VAL(secretkey), keypair, crypto_box_SECRETKEYBYTES); in PHP_FUNCTION()
1169 ZSTR_VAL(secretkey)[crypto_box_SECRETKEYBYTES] = 0; in PHP_FUNCTION()
1193 memcpy(ZSTR_VAL(publickey), keypair + crypto_box_SECRETKEYBYTES, in PHP_FUNCTION()
1195 ZSTR_VAL(publickey)[crypto_box_PUBLICKEYBYTES] = 0; in PHP_FUNCTION()
1222 crypto_scalarmult_base((unsigned char *) ZSTR_VAL(publickey), secretkey); in PHP_FUNCTION()
1223 ZSTR_VAL(publickey)[crypto_box_PUBLICKEYBYTES] = 0; in PHP_FUNCTION()
1266 if (crypto_box_easy((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1273 ZSTR_VAL(ciphertext)[msg_len + crypto_box_MACBYTES] = 0; in PHP_FUNCTION()
1315 if (crypto_box_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1321 ZSTR_VAL(msg)[ciphertext_len - crypto_box_MACBYTES] = 0; in PHP_FUNCTION()
1351 if (crypto_box_seal((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1357 ZSTR_VAL(ciphertext)[msg_len + crypto_box_SEALBYTES] = 0; in PHP_FUNCTION()
1390 if (crypto_box_seal_open((unsigned char *) ZSTR_VAL(msg), ciphertext, in PHP_FUNCTION()
1396 ZSTR_VAL(msg)[ciphertext_len - crypto_box_SEALBYTES] = 0; in PHP_FUNCTION()
1411 if (crypto_sign_keypair((unsigned char *) ZSTR_VAL(keypair) + in PHP_FUNCTION()
1413 (unsigned char *) ZSTR_VAL(keypair)) != 0) { in PHP_FUNCTION()
1418 ZSTR_VAL(keypair)[keypair_len] = 0; in PHP_FUNCTION()
1443 if (crypto_sign_seed_keypair((unsigned char *) ZSTR_VAL(keypair) + in PHP_FUNCTION()
1445 (unsigned char *) ZSTR_VAL(keypair), in PHP_FUNCTION()
1451 ZSTR_VAL(keypair)[keypair_len] = 0; in PHP_FUNCTION()
1485 memcpy(ZSTR_VAL(keypair), secretkey, crypto_sign_SECRETKEYBYTES); in PHP_FUNCTION()
1486 memcpy(ZSTR_VAL(keypair) + crypto_sign_SECRETKEYBYTES, publickey, in PHP_FUNCTION()
1488 ZSTR_VAL(keypair)[keypair_len] = 0; in PHP_FUNCTION()
1512 if (crypto_sign_ed25519_sk_to_pk((unsigned char *) ZSTR_VAL(publickey), in PHP_FUNCTION()
1518 ZSTR_VAL(publickey)[crypto_sign_PUBLICKEYBYTES] = 0; in PHP_FUNCTION()
1542 memcpy(ZSTR_VAL(secretkey), keypair, crypto_sign_SECRETKEYBYTES); in PHP_FUNCTION()
1543 ZSTR_VAL(secretkey)[crypto_sign_SECRETKEYBYTES] = 0; in PHP_FUNCTION()
1567 memcpy(ZSTR_VAL(publickey), keypair + crypto_sign_SECRETKEYBYTES, in PHP_FUNCTION()
1569 ZSTR_VAL(publickey)[crypto_sign_PUBLICKEYBYTES] = 0; in PHP_FUNCTION()
1602 if (crypto_sign((unsigned char *) ZSTR_VAL(msg_signed), in PHP_FUNCTION()
1615 ZSTR_VAL(msg_signed)[msg_signed_real_len] = 0; in PHP_FUNCTION()
1648 if (crypto_sign_open((unsigned char *) ZSTR_VAL(msg), &msg_real_len, in PHP_FUNCTION()
1660 ZSTR_VAL(msg)[msg_real_len] = 0; in PHP_FUNCTION()
1687 memset(ZSTR_VAL(signature), 0, (size_t) crypto_sign_BYTES); in PHP_FUNCTION()
1688 if (crypto_sign_detached((unsigned char *) ZSTR_VAL(signature), in PHP_FUNCTION()
1701 ZSTR_VAL(signature)[signature_real_len] = 0; in PHP_FUNCTION()
1771 if (crypto_stream((unsigned char *) ZSTR_VAL(ciphertext), in PHP_FUNCTION()
1777 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION()
1810 if (crypto_stream_xor((unsigned char *) ZSTR_VAL(ciphertext), msg, in PHP_FUNCTION()
1816 ZSTR_VAL(ciphertext)[ciphertext_len] = 0; in PHP_FUNCTION()
1889 ((unsigned char *) ZSTR_VAL(hash), (unsigned long long) hash_len, in PHP_FUNCTION()
1896 ((unsigned char *) ZSTR_VAL(hash), (unsigned long long) hash_len, in PHP_FUNCTION()
1905 ZSTR_VAL(hash)[hash_len] = 0; in PHP_FUNCTION()
1950 (ZSTR_VAL(hash_str), passwd, (unsigned long long) passwd_len, in PHP_FUNCTION()
1956 ZSTR_VAL(hash_str)[crypto_pwhash_STRBYTES - 1] = 0; in PHP_FUNCTION()
1958 len = strlen(ZSTR_VAL(hash_str)); in PHP_FUNCTION()
2064 ((unsigned char *) ZSTR_VAL(hash), (unsigned long long) hash_len, in PHP_FUNCTION()
2071 ZSTR_VAL(hash)[hash_len] = 0; in PHP_FUNCTION()
2112 (ZSTR_VAL(hash_str), passwd, (unsigned long long) passwd_len, in PHP_FUNCTION()
2118 ZSTR_VAL(hash_str)[crypto_pwhash_scryptsalsa208sha256_STRBYTES - 1] = 0; in PHP_FUNCTION()
2211 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2225 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION()
2280 ((unsigned char *) ZSTR_VAL(msg), &msg_real_len, NULL, in PHP_FUNCTION()
2292 ZSTR_VAL(msg)[msg_real_len] = 0; in PHP_FUNCTION()
2341 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2355 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION()
2406 ((unsigned char *) ZSTR_VAL(msg), &msg_real_len, NULL, in PHP_FUNCTION()
2418 ZSTR_VAL(msg)[msg_real_len] = 0; in PHP_FUNCTION()
2470 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2484 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION()
2540 ((unsigned char *) ZSTR_VAL(msg), &msg_real_len, NULL, in PHP_FUNCTION()
2552 ZSTR_VAL(msg)[msg_real_len] = 0; in PHP_FUNCTION()
2601 ((unsigned char *) ZSTR_VAL(ciphertext), &ciphertext_real_len, msg, in PHP_FUNCTION()
2615 ZSTR_VAL(ciphertext)[ciphertext_real_len] = 0; in PHP_FUNCTION()
2671 ((unsigned char *) ZSTR_VAL(msg), &msg_real_len, NULL, in PHP_FUNCTION()
2683 ZSTR_VAL(msg)[msg_real_len] = 0; in PHP_FUNCTION()
2707 sodium_bin2hex(ZSTR_VAL(hex), hex_len + 1U, bin, bin_len); in PHP_FUNCTION()
2708 ZSTR_VAL(hex)[hex_len] = 0; in PHP_FUNCTION()
2732 if (sodium_hex2bin((unsigned char *) ZSTR_VAL(bin), bin_len, hex, hex_len, in PHP_FUNCTION()
2745 ZSTR_VAL(bin)[bin_real_len] = 0; in PHP_FUNCTION()
2775 sodium_bin2base64(ZSTR_VAL(b64), b64_len, bin, bin_len, (int) variant); in PHP_FUNCTION()
2805 if (sodium_base642bin((unsigned char *) ZSTR_VAL(bin), bin_len, in PHP_FUNCTION()
2819 ZSTR_VAL(bin)[bin_real_len] = 0; in PHP_FUNCTION()
2846 if (crypto_scalarmult((unsigned char *) ZSTR_VAL(q), n, p) != 0) { in PHP_FUNCTION()
2851 ZSTR_VAL(q)[crypto_scalarmult_BYTES] = 0; in PHP_FUNCTION()
2876 sk = (unsigned char *) ZSTR_VAL(keypair); in PHP_FUNCTION()
2884 ZSTR_VAL(keypair)[crypto_kx_SECRETKEYBYTES + crypto_kx_PUBLICKEYBYTES] = 0; in PHP_FUNCTION()
2898 sk = (unsigned char *) ZSTR_VAL(keypair); in PHP_FUNCTION()
2905 ZSTR_VAL(keypair)[crypto_kx_SECRETKEYBYTES + crypto_kx_PUBLICKEYBYTES] = 0; in PHP_FUNCTION()
2928 memcpy(ZSTR_VAL(secretkey), keypair, crypto_kx_SECRETKEYBYTES); in PHP_FUNCTION()
2929 ZSTR_VAL(secretkey)[crypto_kx_SECRETKEYBYTES] = 0; in PHP_FUNCTION()
2953 memcpy(ZSTR_VAL(publickey), keypair + crypto_kx_SECRETKEYBYTES, in PHP_FUNCTION()
2955 ZSTR_VAL(publickey)[crypto_kx_PUBLICKEYBYTES] = 0; in PHP_FUNCTION()
3079 if (crypto_auth((unsigned char *) ZSTR_VAL(mac), in PHP_FUNCTION()
3085 ZSTR_VAL(mac)[crypto_auth_BYTES] = 0; in PHP_FUNCTION()
3141 if (crypto_sign_ed25519_sk_to_curve25519((unsigned char *) ZSTR_VAL(ecdhkey), in PHP_FUNCTION()
3146 ZSTR_VAL(ecdhkey)[crypto_box_SECRETKEYBYTES] = 0; in PHP_FUNCTION()
3170 if (crypto_sign_ed25519_pk_to_curve25519((unsigned char *) ZSTR_VAL(ecdhkey), in PHP_FUNCTION()
3175 ZSTR_VAL(ecdhkey)[crypto_box_PUBLICKEYBYTES] = 0; in PHP_FUNCTION()
3362 crypto_kdf_derive_from_key((unsigned char *) ZSTR_VAL(subkey), in PHP_FUNCTION()
3375 crypto_generichash_blake2b_salt_personal((unsigned char *) ZSTR_VAL(subkey), in PHP_FUNCTION()
3382 ZSTR_VAL(subkey)[subkey_len] = 0; in PHP_FUNCTION()
3428 ZSTR_VAL(padded)[j] = unpadded[i]; in PHP_FUNCTION()
3436 if (sodium_pad(NULL, (unsigned char *) ZSTR_VAL(padded), unpadded_len, in PHP_FUNCTION()
3447 tail = &ZSTR_VAL(padded)[xpadded_len]; in PHP_FUNCTION()
3457 ZSTR_VAL(padded)[xpadded_len + 1U] = 0; in PHP_FUNCTION()
3522 ZSTR_VAL(unpadded)[unpadded_len] = 0; in PHP_FUNCTION()
3610 ((void *) state, (unsigned char *) ZSTR_VAL(c), &c_real_len, in PHP_FUNCTION()
3623 ZSTR_VAL(c)[c_real_len] = 0; in PHP_FUNCTION()
3700 ((void *) state, (unsigned char *) ZSTR_VAL(msg), &msg_real_len, &tag, in PHP_FUNCTION()
3711 ZSTR_VAL(msg)[msg_real_len] = 0; in PHP_FUNCTION()