Home Reference Source Test
import Hasher8 from 'crypto-api/src/hasher/hasher8.mjs'
public interface | source

Hasher8

Extends:

src/hasher/hasher.js~Hasher → Hasher8

Hasher for 8 bit blocks

Constructor Summary

Public Constructor
public

constructor(options: Object)

Member Summary

Public Members
public

Size of block in bytes

public

unitSize: number

Size of unit = 1 byte

Private Members
private

blockUnits: number[]

Current block (only for speed optimization)

Method Summary

Public Methods
public

Process ready blocks

Protected Methods
protected

getStateHash(size: number): string

Get hash from state

protected

processBlock(M: number[])

Process ready blocks

Public Constructors

public constructor(options: Object) source

Params:

NameTypeAttributeDescription
options Object
  • optional

Public Members

public blockSizeInBytes: number source

Size of block in bytes

public unitSize: number source

Size of unit = 1 byte

Private Members

private blockUnits: number[] source

Current block (only for speed optimization)

Public Methods

public process() source

Process ready blocks

Protected Methods

protected getStateHash(size: number): string source

Get hash from state

Params:

NameTypeAttributeDescription
size number
  • optional
  • default: this.state.hash.length

Limit hash size (in chunks)

Return:

string

protected processBlock(M: number[]) source

Process ready blocks

Params:

NameTypeAttributeDescription
M number[]