Guest User

Untitled

a guest
Jan 17th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Username: example
  2. Password: password
  3.  
  4. <?php
  5. $source = 'very long text';
  6. $iv = "1234567812345678";
  7. $pass = 'difficultpassphrase';
  8. $method = 'aes-256-ofb';
  9.  
  10. $encrypted = openssl_encrypt ($source, $method, $pass, true, $iv);
  11. echo $encrypted;
  12.  
  13. $decrypted = openssl_decrypt ($encrypted, $method, $pass, true, $iv);
  14. echo $decrypted;
  15. ?>
Add Comment
Please, Sign In to add comment