PHPackages                             luckystar/crypto - 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. luckystar/crypto

ActiveLibrary[Security](/categories/security)

luckystar/crypto
================

v1(2y ago)03PHP

Since Apr 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/HasanKaya53/php-encryption-library)[ Packagist](https://packagist.org/packages/luckystar/crypto)[ RSS](/packages/luckystar-crypto/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

php-encryption-library
======================

[](#php-encryption-library)

This is a simple PHP library that provides a simple interface for encrypting and decrypting data using the OpenSSL extension.

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

[](#installation)

You can install the library via Composer. Run the following command:

```
composer require luckystar/crypto
```

### Function list

[](#function-list)

FunctionDescriptionExampleencryptEncrypt the given dataencrypt('Hello, World!')decryptDecrypt the given datadecrypt('b0lSSVJzeTUwZ1p4WGpmNUY0Zk55NE9janZaZWM1VVhKUEdVUDBSZWh2WT0=')getOutputGet the output of the encryption or decryption processgetOutput()setSecretKeySet the secret key to use for encryption and decryptionsetSecretKey('00cccskmmx55')setSecretIvSet the secret iv to use for encryption and decryptionsetSecret('00cccskmmx55')createSecretKeyCreate a secret keycreateSecretKey()createSecretIvCreate a secret ivcreateSecretIv()createRandomStringCreate a random stringcreateRandomString($length)createRandomNumberCreate a random numbercreateRandomNumber($length)createRandomHexCreate a random hexcreateRandomHex($length) createUuid  Create a UUID  createUuid()  createRandomPassword  Create a random password  createRandomPassword($length = 10, $useLowercase = true, $useUppercase = true, $useNumbers = true, $useSymbols = true, $customChars = 'custom list') //!@#$%^&amp;\*()\_+ Usage
-----

[](#usage)

```
use \LuckyStar\Crypto\Crypto;

// Encrypt data

echo $crypto->setSecretIv('00cccskmmx55')
	->setSecretKey('00	cccxxx55')
	->encrypt('Hello, World!')->getOutput();

// Decrypt data

echo $crypto->decrypt('b0lSSVJzeTUwZ1p4WGpmNUY0Zk55NE9janZaZWM1VVhKUEdVUDBSZWh2WT0=')->getOutput();
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

809d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8221001?v=4)[Hasan Kaya](/maintainers/hasankaya)[@hasankaya](https://github.com/hasankaya)

---

Top Contributors

[![HasanKaya53](https://avatars.githubusercontent.com/u/35229371?v=4)](https://github.com/HasanKaya53 "HasanKaya53 (5 commits)")

### Embed Badge

![Health badge](/badges/luckystar-crypto/health.svg)

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

###  Alternatives

[mews/purifier

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

2.0k18.7M142](/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)
