3 ms·
Also: Don't implement chacha20-poly1305 or AES-GCM yourself, unless you're a crypto expert. You'll more than likely make a mistake. Libsodium offers both (but
by CiPHPerCoder 11y ago
Also: Don't implement chacha20-poly1305 or AES-GCM yourself, unless you're a crypto expert.
You'll more than likely make a mistake.
Libsodium offers both (but AES-256-GCM is only available if you have hardware support for constant-time implementations).
crypto_aead_chacha20poly1305_encrypt()
crypto_aead_chacha20poly1305_decrypt()
crypto_aead_aes256gcm_encrypt()
crypto_aead_aes256gcm_decrypt()
https://github.com/jedisct1/libsodium https://github.com/jedisct1/libsodium