encrypt.php 405 B

1234567891011121314
  1. <?php
  2. require __DIR__ . '/../vendor/autoload.php';
  3. $password = "myPassword";
  4. $plaintext = "Here is my test vector. It's not too long, but more than a block and needs padding.";
  5. $cryptor = new \RNCryptor\RNCryptor\Encryptor;
  6. //$cryptor->setIterations(100);
  7. $base64Encrypted = $cryptor->encrypt($plaintext, $password);
  8. echo "Plaintext:\n$plaintext\n\n";
  9. echo "Base64 Encrypted:\n$base64Encrypted\n\n";