ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt

SummerySummery

Authenticated Encryption with Associated Data: Encryption

Syntax

ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt( string $plaintext = '', string $assocData = '', string $nonce = '', string $key = '' )

DescriptionDescription

Algorithm: AES-256-GCM

ParametersParameters

$plaintext

(string) (Optional) Message to be encrypted

Default value: ''

$assocData

(string) (Optional) Authenticated Associated Data (unencrypted)

Default value: ''

$nonce

(string) (Optional) Number to be used only Once; must be 8 bytes

Default value: ''

$key

(string) (Optional) Encryption key

Default value: ''

ReturnReturn

(string) Ciphertext with a 16-byte GCM message authentication code appended

SourceSource

File: wp-includes/sodium_compat/src/Compat.php


			
Scroll to Top