INNER CODE UNIT · C

msg

jedisct1/libsodium-php · libsodium.c:1159

    msg = zend_string_checked_alloc((size_t) ciphertext_len - crypto_box_MACBYTES, 0);
    if (crypto_box_open_easy((unsigned char *) ZSTR_VAL(msg), ciphertext,
                             (unsigned long long) ciphertext_len,
                             nonce, publickey, secretkey) != 0) {
        zend_string_free(msg);
        RETURN_FALSE;
    } else {
        RETURN_STR(msg);
    }
}

PHP_FUNCTION(sodium_crypto_box_seal)
{
    zend_string   *ciphertext;
    unsigned char *msg;
    unsigned char *publickey;
    size_t         msg_len;
    size_t         publickey_len;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…