Files
dataEncryptor/README.md
Brad Cimbura b6c51847e5
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix readme typo
2024-02-19 11:38:23 -06:00

773 B

dataEncryptor

status-badge

Installation

Setup this registry in your ~/.composer/config.json file:

{
	"repositories": [{
			"type": "composer",
			"url": "https://git.hpz.pw/api/packages/hpz937/composer"
		}
	]
}

To install the package using Composer, run the following command:

composer require hpz937/encryption:1.0.0

Usage

$key = "really_strong_encryption_key";
$dataEncryptor = new DataEncryptor($key);

$stringToEncrypt = "data you would like to encrypt"
$encryptedData = $dataEncryptor->encrypt($stringToEncrypt);
var_dump($encryptedData);

$decryptedData = $dataEncryptor->decrypt($encryptedData);
var_dump($decryptedData);