Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am wopot on github.
* I am wopot (https://keybase.io/wopot) on keybase.
* I have a public key ASAhhzy0IuR1XfTPGJ2SrOmzpM9IaNTP-6z6Qi5xRYuAJQo
To claim this, I am signing this object:
<?php
require_once('Crypto.php');
function setKey(){
try {
$key = Crypto::CreateNewRandomKey();
// WARNING: Do NOT encode $key with bin2hex() or base64_encode(),
// they may leak the key to the attacker through side channels.
} catch (CryptoTestFailedException $ex) {
die('Cannot safely create a key');
} catch (CannotPerformOperationException $ex) {