00f100/fcphp-crypto

There is no license information available for the latest version (0.2.1) of this package.

Crypto content for FcPhp

0.2.1 2018-08-04 18:54 UTC

This package is auto-updated.

Last update: 2024-11-18 06:12:56 UTC


README

Package to crypto contents using Sodium PHP Cryptography Extensions

Build Status codecov

PHP Version Packagist Version Total Downloads

How to install

Composer:

$ composer require 00f100/fcphp-crypto

or add in composer.json

{
    "require": {
        "00f100/fcphp-crypto": "*"
    }
}

How to use

<?php

use FcPhp\Crypto\Crypto;

// Configure crypto
$nonce = Crypto::getNonce();
$cryto = new Crypto($nonce);
$key = $cryto->generateKey();


// Example
$var = ['index' => 'value'];
$encode = $crypto->encode($key, $var);
$decode = $crypto->decode($key, $encode);