Documentation

Keccak
in package

Tags
source

Table of Contents

ENCODING  = '8bit'
KECCAK_ROUNDS  = 24
LFSR  = 0x1
$keccakf_piln  : array<string|int, mixed>
$keccakf_rotc  : array<string|int, mixed>
$x64  : bool
hash()  : string
shake()  : string
keccak()  : string
keccak32()  : string
keccak64()  : string
keccakf32()  : void
keccakf64()  : void

Constants

ENCODING

private mixed ENCODING = '8bit'

KECCAK_ROUNDS

private mixed KECCAK_ROUNDS = 24

Properties

$keccakf_piln

private static array<string|int, mixed> $keccakf_piln = [10, 7, 11, 17, 18, 3, 5, 16, 8, 21, 24, 4, 15, 23, 19, 13, 12, 2, 20, 14, 22, 9, 6, 1]

$keccakf_rotc

private static array<string|int, mixed> $keccakf_rotc = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 2, 14, 27, 41, 56, 8, 25, 43, 62, 18, 39, 61, 20, 44]

$x64

private static bool $x64 = PHP_INT_SIZE === 8

Methods

hash()

public static hash( $in, int $mdlen[, bool $raw_output = false ]) : string
Parameters
$in :
$mdlen : int
$raw_output : bool = false
Return values
string

shake()

public static shake( $in, int $security_level, int $outlen[, bool $raw_output = false ]) : string
Parameters
$in :
$security_level : int
$outlen : int
$raw_output : bool = false
Return values
string

keccak()

private static keccak( $in_raw, int $capacity, int $outputlength,  $suffix, bool $raw_output) : string
Parameters
$in_raw :
$capacity : int
$outputlength : int
$suffix :
$raw_output : bool
Return values
string

keccak32()

private static keccak32( $in_raw, int $capacity, int $outputlength,  $suffix, bool $raw_output) : string
Parameters
$in_raw :
$capacity : int
$outputlength : int
$suffix :
$raw_output : bool
Return values
string

keccak64()

private static keccak64( $in_raw, int $capacity, int $outputlength,  $suffix, bool $raw_output) : string
Parameters
$in_raw :
$capacity : int
$outputlength : int
$suffix :
$raw_output : bool
Return values
string

keccakf32()

private static keccakf32( &$st,  $rounds) : void
Parameters
$st :
$rounds :
Return values
void

keccakf64()

private static keccakf64( &$st,  $rounds) : void
Parameters
$st :
$rounds :
Return values
void

Search results