@intofilm/signature
v0.1.3
Published
The Into Film Signature Generator
Downloads
33
Readme
The Into Film Signature Generator
The Into Film Signature Generator allows developers to create unique signature for any arrays and to be sure it is always the same for the same arrays. It doesn't depend on elements or keys order.
Installation
Requirements PHP
- PHP 7+ compiled with the cURL extension
- A recent version of cURL 7.16.2+ compiled with OpenSSL and zlib
Composer
The recommended way to install the Into Film SDK is via Composer. Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.
# Install Composer
curl -sS https://getcomposer.org/installer | phpAfter installing you will need to add the Into Film Signature to the composer.json.
Due to this it is currently necessary to include a repositories section in the composer.json.
Example composer.json
{
"repositories": [
{
"type": "git",
"url": "ssh://[email protected]/intofilm/intofilm-signature.git"
}
],
"require": {
"intofilm/intofilm-signature": "0.1.*"
}
}Install dependencies
php composer.phar installExamples
Using array input
<?php
require_once 'vendor/autoload.php';
use IntoFilm\Signature\Signature;
$input = ['key1'=>'value1', 'key2'=>'value2'];
$generator = new Signature();
$signature = $generator->generate($input);Using json encoded string input
<?php
require_once 'vendor/autoload.php';
use IntoFilm\Signature\Signature;
$input = '{"key1":"value1","key2":"value2"}';
$generator = new Signature();
$signature = $generator->generate($input);In Node.js
Using npm:
$ npm i @intofilm/signatureExample
In Node.js:
// Load the lib.
const signature = require("@intofilm/signature");
const hash = signature({ key1: "value1", key2: "value2" });