PHPackages                             hktr92/php-secrecy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hktr92/php-secrecy

ActiveLibrary

hktr92/php-secrecy
==================

Secrecy holds your sensitive data as safe as possible from leaking.

0.1.0(3y ago)45MITPHPPHP &gt;=7.3.0

Since Nov 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/hktr92/php-secrecy)[ Packagist](https://packagist.org/packages/hktr92/php-secrecy)[ RSS](/packages/hktr92-php-secrecy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

php-secrecy
===========

[](#php-secrecy)

Secrecy holds your sensitive data as safe as possible from leaking.

It provides safety for following events:

- accidental `__toString()` conversion, e.g. when logging;
- disallows `clone` to keep the data in a single place;
- prevents leaking in `\serialize()`, `var_dump()` and `var_export()`;
- rejects unsafe input from `\unserialize()`;

Disclaimer
----------

[](#disclaimer)

This library **does not** provide any password hashing functionality, nor any sort of in-memory "encryption" of the data. It only tries its best to prevent leaking the sensitive data in various modes and places.

It's not 100% bullet-proof, since it requires a separate stream to keep the password, which can be accessed at any time.

Usage
-----

[](#usage)

```
