CryptoPublic
class CryptoPublic
libsodium wrapper class for public-key authenticated crypto
Methods
static array
GenerateKeyPair()
Generates a public/private keypair
static string
Encrypt(string $message, string $nonce, string $recipient_public, string $sender_private)
Encrypts and signs data from a sender to a recipient
static string
Decrypt(string $message, string $nonce, string $recipient_private, string $sender_public)
Decrypts and verifies data from a sender to a recipient
Details
at line 103
static array
GenerateKeyPair()
Generates a public/private keypair
at line 120
static string
Encrypt(string $message, string $nonce, string $recipient_public, string $sender_private)
Encrypts and signs data from a sender to a recipient
at line 137
static string
Decrypt(string $message, string $nonce, string $recipient_private, string $sender_public)
Decrypts and verifies data from a sender to a recipient