Recommend this page to a friend! |
Classes of John Conde | > | PHP Simple Encryption and Decryption | > | src/Encryption/Traits/encryptWithoutPadding.php.txt | > | Download |
|
![]() |
<?php declare(strict_types=1); namespace Encryption\Traits; trait EncryptWithoutPadding { public function encrypt(string $plainText, string $key, string $iv): string { return base64_encode(openssl_encrypt($plainText, static::CIPHER, $key, OPENSSL_RAW_DATA, $iv)); } } |