PHPackages                             tankfairies/tcrypt - 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. [Security](/categories/security)
4. /
5. tankfairies/tcrypt

ActiveLibrary[Security](/categories/security)

tankfairies/tcrypt
==================

End to end encryption hanlder

2.0.3(2y ago)115[1 PRs](https://github.com/tankfairies/tcrypt/pulls)1MITPHPPHP ^8.2

Since Sep 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tankfairies/tcrypt)[ Packagist](https://packagist.org/packages/tankfairies/tcrypt)[ Docs](https://tankfairies.com/)[ RSS](/packages/tankfairies-tcrypt/feed)WikiDiscussions 2.0 Synced 2mo ago

READMEChangelog (5)Dependencies (3)Versions (12)Used By (1)

[![Latest Stable Version](https://camo.githubusercontent.com/6c4b09df1e306942c61840a6473fdb9eea48fa74b1b15cdabf20ac8b412da3b2/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f7463727970742f762f737461626c65)](https://packagist.org/packages/tankfairies/tcrypt)[![Total Downloads](https://camo.githubusercontent.com/48878a76efd0c4450dd4caef7915e340f655b01731ce64adfc172bd7acd944b6/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f7463727970742f646f776e6c6f616473)](https://packagist.org/packages/tankfairies/tcrypt)[![Latest Unstable Version](https://camo.githubusercontent.com/cd74d00ec7f4c8fd5288d534dbf9c84b50cc8b09667c354df62b33dd31d89b57/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f7463727970742f762f756e737461626c65)](https://packagist.org/packages/tankfairies/tcrypt)[![License](https://camo.githubusercontent.com/0e011e95aa25e7b556581d1db9afe894782729524d6f1850ea1e41c77ed414ca/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f7463727970742f6c6963656e7365)](https://packagist.org/packages/tankfairies/tcrypt)[![Build Status](https://camo.githubusercontent.com/19d7789f21ecd982d6a493ad014a0333b99de9f260513a11d5d9dd06d6e49aec/68747470733a2f2f7472617669732d63692e636f6d2f74616e6b666169726965732f7463727970742e7376673f6272616e63683d322e30)](https://travis-ci.com/github/tankfairies/tcrypt)

Tcrypt
======

[](#tcrypt)

This is an implemetation of part of the sodium encryption library providing the ability to do end to end encryption.

Installation
------------

[](#installation)

Install with [Composer](https://getcomposer.org/):

```
composer require tankfairies/tcrypt
```

Usage
-----

[](#usage)

Instantiate a copied of Keys for handing local key pairs.

```
$keys = new Keys();
$keys->setPasswordAndSalt('senders_password', 'a_custom_salt_at_least_15_chars_long');
$thePublicSenderKey = $keys->getPublicKey();

$keys = new Keys();
$keys->setPasswordAndSalt('receivers_password', 'a_custom_salt_at_least_15_chars_long');
$thePublicReceiverKey = $keys->getPublicKey();
```

Example of a generated public key

`a322e905bd29167702bfc816a6e5ad2be0d8ede171d3c6e68497a5ef5b316d08`

Encrypt the message: -

```
$crypt = new Encrypt();
$crypt
    ->setLocalKeys($sendKeys)
    ->setForeignKey($thePublicReceiverKey);

$encryptedMessage = $crypt->enc('my secret message');
```

This will produce something like: -

`9G/vMg4piI778CzVpjcOL/c4kGV7+j0ih+JfuYh0QzWYyfAvwQcy1tW8jXcrb2Fd5aRvkljTeQ55`

To Decrypt the message: -

```
$decrypt = new Decrypt();
$decrypt
    ->setLocalKeys($keys)
    ->setForeignKey($thePublicSenderKey);

$decryptedMessage = $decrypt->dec($encryptedMessage);
```

Copyright and license
---------------------

[](#copyright-and-license)

The tankfairies/tcrypt library is Copyright (c) 2019 Tankfairies () and licensed for use under the MIT License (MIT).

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~180 days

Recently: every ~0 days

Total

10

Last Release

817d ago

Major Versions

v0.9 → v1.02019-09-05

v1.3 → 2.02024-02-16

PHP version history (3 changes)v0.9PHP ^7.2

v1.1PHP ^7.3

2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/761e80f0c4632541e235d7d45128d65ace90c65e3c799c11c36a120155eaad58?d=identicon)[tankfairies](/maintainers/tankfairies)

---

Top Contributors

[![tankfairies](https://avatars.githubusercontent.com/u/50480804?v=4)](https://github.com/tankfairies "tankfairies (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")

---

Tags

encryptionsodium

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/tankfairies-tcrypt/health.svg)

```
[![Health](https://phpackages.com/badges/tankfairies-tcrypt/health.svg)](https://phpackages.com/packages/tankfairies-tcrypt)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[paragonie/ciphersweet

Searchable field-level encryption library for relational databases

4641.2M21](/packages/paragonie-ciphersweet)[ass/xmlsecurity

The XmlSecurity library is written in PHP for working with XML Encryption and Signatures

955.6M30](/packages/ass-xmlsecurity)[pear/crypt_gpg

Provides an object oriented interface to the GNU Privacy Guard (GnuPG). It requires the GnuPG executable to be on the system.

954.4M10](/packages/pear-crypt-gpg)[nzo/url-encryptor-bundle

The NzoUrlEncryptorBundle is a Symfony Bundle used to Encrypt and Decrypt data and variables in the Web application or passed through URL

961.0M2](/packages/nzo-url-encryptor-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
