\Yurun\PaySDK\Lib\EncryptAES256GCM

Summary

Methods
Properties
Constants
decryptToString()
No public properties found
KEY_LENGTH_BYTE
AUTH_TAG_LENGTH_BYTE
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

KEY_LENGTH_BYTE

KEY_LENGTH_BYTE = 32

AUTH_TAG_LENGTH_BYTE

AUTH_TAG_LENGTH_BYTE = 16

Methods

decryptToString()

decryptToString(string  $aesKey, string  $associatedData, string  $nonceStr, string  $ciphertext) : string|boolean

Decrypt AEAD_AES_256_GCM ciphertext.

Parameters

string $aesKey

API V3 Key

string $associatedData

AES GCM additional authentication data

string $nonceStr

AES GCM nonce

string $ciphertext

AES GCM cipher text

Returns

string|boolean —

Decrypted string on success or FALSE on failure