This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |