SignHasher
in package
implements
HasherInterface
Table of Contents
Interfaces
Properties
- $sizeMap : array<string|int, int>
- $adapter : GmpMathInterface
- $algorithm : string
Methods
- __construct() : mixed
- SignHasher constructor.
- getAlgorithm() : string
- getLengthInBytes() : int
- makeHash() : GMP
- makeRawHash() : string
- truncateForECDSA() : GMP
Properties
$sizeMap
protected
static array<string|int, int>
$sizeMap
= ['sha1' => 20, 'sha224' => 28, 'sha256' => 32, 'sha384' => 48, 'sha512' => 64]
$adapter
private
GmpMathInterface
$adapter
$algorithm
private
string
$algorithm
Methods
__construct()
SignHasher constructor.
public
__construct(string $algorithm[, GmpMathInterface|null $math = null ]) : mixed
Parameters
- $algorithm : string
- $math : GmpMathInterface|null = null
getAlgorithm()
public
getAlgorithm() : string
Return values
stringgetLengthInBytes()
public
getLengthInBytes() : int
Return values
intmakeHash()
public
makeHash(string $data, GeneratorPoint $G) : GMP
Parameters
- $data : string
- $G : GeneratorPoint
Return values
GMPmakeRawHash()
public
makeRawHash(string $data) : string
Parameters
- $data : string
Return values
stringtruncateForECDSA()
public
truncateForECDSA(GMP $hash, GeneratorPoint $G) : GMP
Parameters
- $hash : GMP
- $G : GeneratorPoint