Cipher
in
An authenticated cipher behind Encryption. Implementations must detect a wrong key or a modified payload, so only AEAD algorithms qualify.
Table of Contents
Methods
decrypt()
public
decrypt(string $key, string $payload) : string
Parameters
- $key : string
-
32 raw bytes
- $payload : string
Tags
Return values
string —encrypt()
public
encrypt(string $key, string $plaintext) : string
Parameters
- $key : string
-
32 raw bytes
- $plaintext : string
Return values
string —Raw bytes, including everything decrypt() needs besides the key