略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: sodium_crypto_aead_aegis128l_encrypt

2025-02-27

sodium_crypto_aead_aegis128l_encrypt

(PHP 8 >= 8.4.0)

sodium_crypto_aead_aegis128l_encryptEncrypt then authenticate a message with AEGIS-128L

说明

sodium_crypto_aead_aegis128l_encrypt(
    #[\SensitiveParameter] string $message,
    string $additional_data,
    string $nonce,
    #[\SensitiveParameter] string $key
): string

Encrypt then authenticate a message with AEGIS-128L.

参数

message
The plaintext message to encrypt.
additional_data
Additional, authenticated data. This is used in the verification of the authentication tag appended to the ciphertext, but it is not encrypted or stored in the ciphertext.
nonce
A number that must be only used once, per message.
key
Encryption key (128-bit).

返回值

Returns the ciphertext and authentication tag as a string of raw binary bytes.

参见

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/function.sodium-crypto-aead-aegis128l-encrypt.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3