Skip to content

Mad-Collective/hasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hasher

Hash IMG

Table of contents


Class: \Pluggit\Hasher\Hasher

The Hasher class is in charge of create and validate hashes given a payload

Visibility Function
public __construct(string $privateKey) : void
Hasher constructor, both parts of the communication, have to use the same private key.
public hash(string $payload) : string
Create a hash given a payload
public isValid(string $payload, string $hash) : bool
Validate a hash given a payload

Command-line hash generation

To generate a new hash execute:

./hasher hash <private_key> <payload>

To check if a hash is valid execute: <<<<<<< HEAD

./hasher check <private_key> <payload> <hash>

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •