PHP Classes

File: src/Encryption/Traits/encryptWithoutPadding.php.txt

Recommend this page to a friend!
  Classes of John Conde   PHP Simple Encryption and Decryption   src/Encryption/Traits/encryptWithoutPadding.php.txt   Download  
File: src/Encryption/Traits/encryptWithoutPadding.php.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: PHP Simple Encryption and Decryption
Encrypt and decrypt data
Author: By
Last change: Update of src/Encryption/Traits/encryptWithoutPadding.php.txt
Date: 3 years ago
Size: 291 bytes
 

Contents

Class file image 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)); } }