PHPackages                             tankfairies/laravel-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/laravel-tcrypt

ActiveLibrary[Security](/categories/security)

tankfairies/laravel-tcrypt
==========================

Laravel Sodium encryption

1.0.2(2y ago)03MITPHPPHP ^8.2

Since Feb 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/tankfairies/laravel-tcrypt)[ Packagist](https://packagist.org/packages/tankfairies/laravel-tcrypt)[ Docs](https://tankfairies.com/)[ RSS](/packages/tankfairies-laravel-tcrypt/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (4)Versions (4)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/dcfef77c3b8391ecec803374ad8d06b4fccc5a2b70b4a3d68179e0a2b8060856/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f6c61726176656c2d7463727970742f762f737461626c65)](https://packagist.org/packages/tankfairies/laravel-tcrypt)[![Total Downloads](https://camo.githubusercontent.com/78b2bdad6e76e14f36a92ee53850a515a2cd5eb8eb874701ef4cb036a2f318eb/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f6c61726176656c2d7463727970742f646f776e6c6f616473)](https://packagist.org/packages/tankfairies/laravel-tcrypt)[![Latest Unstable Version](https://camo.githubusercontent.com/2d6b315e8a3e2740d77714247e26379595d6974f5b981352dd85d9b90b16b134/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f6c61726176656c2d7463727970742f762f756e737461626c65)](https://packagist.org/packages/tankfairies/laravel-tcrypt)[![License](https://camo.githubusercontent.com/8429e918dc505b675e8bf0d9be024647ccbd0807f4acebf9b31a554fde8cccfe/68747470733a2f2f706f7365722e707567782e6f72672f74616e6b666169726965732f6c61726176656c2d7463727970742f6c6963656e7365)](https://packagist.org/packages/tankfairies/laravel-tcrypt)[![Build Status](https://camo.githubusercontent.com/473d3dcdfdf00562d0181acee1b30f7855aa1de39c27ca945eb19fdf9014a190/68747470733a2f2f7472617669732d63692e636f6d2f74616e6b666169726965732f6c61726176656c2d7463727970742e7376673f6272616e63683d6d61696e)](https://travis-ci.com/github/tankfairies/laravel-tcrypt)

Laravel Tcrypt
==============

[](#laravel-tcrypt)

This Laravel package is useful for using 2 way encryption with Sodium.

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

[](#installation)

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

```
composer require tankfairies/laravel-tcryppt
```

#### Laravel

[](#laravel)

Register the package service provider in `config/app.php` file.

```
'providers' => [
    Tankfairies\LaravelTcrypt\GuidServiceProvider::class,
]
```

Public Key
----------

[](#public-key)

How to generate your public key. The sender and receiver exchange these.

```
$publicKey = generate_public_tkey('your_password', 'your_salt');
```

The public key will look something like: -

`a322e905bd29167702bfc816a6e5ad2be0d8ede171d3c6e68497a5ef5b316d08`

Encrypt A message
-----------------

[](#encrypt-a-message)

How to encrypt a message.

```
$encryptedMessage = tcrypt(
        'encrypt',
        'your_password',
        'your_salt',
        'my secret message',
        'the_public_key_from_the_receiver');
```

This will produce something like: -

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

Decrypt A message
-----------------

[](#decrypt-a-message)

How to decrypt a message.

```
$decryptedMessage = tcrypt(
        'decrypt',
        'your_password',
        'your_salt',
        'the encrypted message',
        'the_public_key_from_the_sender');
```

This will produce something like: -

`my secret message`

Copyright and licence
---------------------

[](#copyright-and-licence)

The tankfairies/laravel-guid library is Copyright (c) 2019 Tankfairies () and licenced for use under the MIT Licence (MIT).

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

866d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/50480804?v=4)[Jon](/maintainers/tankfairies)[@tankfairies](https://github.com/tankfairies)

---

Top Contributors

[![tankfairies](https://avatars.githubusercontent.com/u/50480804?v=4)](https://github.com/tankfairies "tankfairies (6 commits)")

---

Tags

tcrypt

###  Code Quality

TestsCodeception

### Embed Badge

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

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

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.7M143](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k37](/packages/paragonie-ecc)

PHPackages © 2026

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