forked from archwisp/PHPEncryptData
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.php
More file actions
Latest commit
14 lines (10 loc) · 393 Bytes
/
Copy pathExample.php
File metadata and controls
14 lines (10 loc) · 393 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php// vim:ts=4:sts=4:sw=4:et:
require__DIR__ . '/vendor/autoload.php';
$phpcrypt = new \PHPEncryptData\Simple(
'6zp4y5vnUQpfEroWI6dMq5lC46F5Dmqa4NDcM1W42k=',
'RJikKksPg3UmqgQPXBwCmcSOMHQn0iOtQAFcfRQOTU='
);
$ciphertext = $phpcrypt->encrypt('Foobar');
printf("Ciphertext: %s\n", $ciphertext);
$decrypted = $phpcrypt->decrypt($ciphertext);
printf("Decrypted: %s\n", $decrypted);