PHP Classes
elePHPant
Icontem

File: README.md

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  PHP Blake Chain  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Blake Chain
Create and verify chained blocks of hashed data
Author: By
Last change:
Date: 4 months ago
Size: 1,310 bytes
 

 

Contents

Class file image Download

Blakechain

Build Status Latest Stable Version Latest Unstable Version License

Blakechain is a simple hash-chain data structure based on the BLAKE2b hash function.

Includes:

  • The Blakechain implementation, which chains together Node objects
  • A runtime Verifier class that validates the self-consistency of an entire chain (or a subset of an entire chain)

Blakechain is not a blockchain. You probably don't need a blockchain.

Blakechain provides the data structure used in Chronicle.

How Blakechain Works

The hash of each message is a keyed BLAKE2b hash, where the key of this message is the hash of the previous message.

Recursively:

$hash[$n] = sodium_crypto_generichash(
    $data[$n],
    $hash[$n - 1]
);