Lines Matching refs:ciphertext

20 $ciphertext = sodium_crypto_aead_chacha20poly1305_encrypt($msg, $ad, $nonce, $key);
21 $msg2 = sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $ad, $nonce, $key);
22 var_dump($ciphertext !== $msg);
24 var_dump(sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, 'x' . $ad, $nonce, $key));
27 $msg2 = sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $ad, $key, $nonce);
43 $ciphertext = sodium_crypto_aead_chacha20poly1305_ietf_encrypt($msg, $ad, $nonce, $key);
44 $msg2 = sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, $ad, $nonce, $key);
45 var_dump($ciphertext !== $msg);
47 … var_dump(sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, 'x' . $ad, $nonce, $key));
50 $msg2 = sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, $ad, $key, $nonce);
72 $ciphertext = sodium_crypto_aead_xchacha20poly1305_ietf_encrypt($msg, $ad, $nonce, $key);
73 $msg2 = sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $ad, $nonce, $key);
74 var_dump($ciphertext !== $msg);
76 … var_dump(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, 'x' . $ad, $nonce, $key));
79 $msg2 = sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $ad, $key, $nonce);
98 $ciphertext = sodium_crypto_aead_aes256gcm_encrypt($msg, $ad, $nonce, $key);
99 $msg2 = sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $ad, $nonce, $key);
100 var_dump($ciphertext !== $msg);
102 var_dump(sodium_crypto_aead_aes256gcm_decrypt($ciphertext, 'x' . $ad, $nonce, $key));
105 $msg2 = sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $ad, $key, $nonce);
124 $ciphertext = sodium_crypto_aead_aegis128l_encrypt($msg, $ad, $nonce, $key);
125 $msg2 = sodium_crypto_aead_aegis128l_decrypt($ciphertext, $ad, $nonce, $key);
126 var_dump($ciphertext !== $msg);
128 var_dump(sodium_crypto_aead_aegis128l_decrypt($ciphertext, 'x' . $ad, $nonce, $key));
131 $msg2 = sodium_crypto_aead_aegis128l_decrypt($ciphertext, $ad, $key, $nonce);
150 $ciphertext = sodium_crypto_aead_aegis256_encrypt($msg, $ad, $nonce, $key);
151 $msg2 = sodium_crypto_aead_aegis256_decrypt($ciphertext, $ad, $nonce, $key);
152 var_dump($ciphertext !== $msg);
154 var_dump(sodium_crypto_aead_aegis256_decrypt($ciphertext, 'x' . $ad, $nonce, $key));
157 $msg2 = sodium_crypto_aead_aegis256_decrypt($ciphertext, $ad, $key, $nonce);