Using the extension for php - metahashorg/crypt_example_php GitHub Wiki

  • high speed of working (generation of keys / addresses / signatures, signature validation)
  • no additional files in the project folder
  • requiring additional steps to install and configure the extension

Dependencies

For ubuntu 14.x 16.x 18.x follow these steps:

First of all you need to install php repository with php 7.x :

  1. Install add-apt-repository scripts and add repo
sudo apt-get update
for i in python-software-properties software-properties-common; do sudo sudo  apt-get -y install $i; done
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update -y
  1. Install php-7.2 with needed mondules
sudo apt-get install php7.2-cli php7.2-curl php7.2-dev php7.2-gmp
  1. Create a folder and unpack or clone this repository.

For example (using git)

cd ~
mkdir crypt_example_php
chmod 0777 crypt_example_php/
git clone https://github.com/metahashorg/crypt_example_php.git crypt_example_php/
  1. Open the created folder and follow the steps below.

For example

cd ~/crypt_example_php/
  1. Install mhcrypto extension

You need to build and load extension mhcrypto.

  1. Change crypt_example.php

In the file crypt_example.php, set the value of the constant MHCRYPTO to true.

For example

sudo nano crypt_example.php
  1. Create the folder data and set Read and Write permissions (unix chmod 0777)

For example

mkdir data
chmod 0777 data/