Home Reference Source Test
public class | source

Hash

Extends:

Serializable → Hash

Static Method Summary

Static Public Methods
public static

async argon2d(arr: Uint8Array): Promise<Hash>

public static

blake2b(arr: Uint8Array): Hash

public static

compute(arr: Uint8Array, algorithm: Hash.Algorithm): Hash

public static

computeBlake2b(input: Uint8Array): Uint8Array

public static

computeSha256(input: Uint8Array): Uint8Array

public static

computeSha512(input: Uint8Array): Uint8Array

public static

fromAny(hash: Hash | Uint8Array | string, algorithm: Hash.Algorithm): Hash

public static

fromBase64(base64: string): Hash

public static

fromHex(hex: string): Hash

public static

fromPlain(str: string): Hash

public static

fromString(str: string): Hash

public static

getSize(algorithm: Hash.Algorithm): number

public static

hard(arr: Uint8Array): Promise<Hash>

this method was deprecated.
public static

isHash(o: Hash): boolean

public static

light(arr: Uint8Array): Hash

this method was deprecated.
public static

sha256(arr: Uint8Array): Hash

public static

sha512(arr: Uint8Array): Hash

public static

unserialize(buf: SerialBuffer, algorithm: Hash.Algorithm): Hash

Member Summary

Public Members
public get

algorithm: Hash.Algorithm

public get

array: Uint8Array

public get

serializedSize: number

Method Summary

Public Methods
public

equals(o: Serializable): boolean

public
public

subarray(begin: number, end: number): Uint8Array

public

toPlain(): string

Inherited Summary

From class Serializable
public

compare(o: Serializable): number

public

equals(o: Serializable): boolean

public

hashCode(): *

public abstract
public

toBase64(): string

public

toHex(): string

public

toString(): string

Static Public Methods

public static async argon2d(arr: Uint8Array): Promise<Hash> source

Params:

NameTypeAttributeDescription
arr Uint8Array

Return:

Promise<Hash>

public static blake2b(arr: Uint8Array): Hash source

Params:

NameTypeAttributeDescription
arr Uint8Array

Return:

Hash

public static compute(arr: Uint8Array, algorithm: Hash.Algorithm): Hash source

Params:

NameTypeAttributeDescription
arr Uint8Array
algorithm Hash.Algorithm

Return:

Hash

public static computeBlake2b(input: Uint8Array): Uint8Array source

Params:

NameTypeAttributeDescription
input Uint8Array

Return:

Uint8Array

public static computeSha256(input: Uint8Array): Uint8Array source

Params:

NameTypeAttributeDescription
input Uint8Array

Return:

Uint8Array

public static computeSha512(input: Uint8Array): Uint8Array source

Params:

NameTypeAttributeDescription
input Uint8Array

Return:

Uint8Array

public static fromAny(hash: Hash | Uint8Array | string, algorithm: Hash.Algorithm): Hash source

Params:

NameTypeAttributeDescription
hash Hash | Uint8Array | string
algorithm Hash.Algorithm

Return:

Hash

public static fromBase64(base64: string): Hash source

Params:

NameTypeAttributeDescription
base64 string

Return:

Hash

public static fromHex(hex: string): Hash source

Params:

NameTypeAttributeDescription
hex string

Return:

Hash

public static fromPlain(str: string): Hash source

Params:

NameTypeAttributeDescription
str string

Return:

Hash

public static fromString(str: string): Hash source

Params:

NameTypeAttributeDescription
str string

Return:

Hash

public static getSize(algorithm: Hash.Algorithm): number source

Params:

NameTypeAttributeDescription
algorithm Hash.Algorithm

Return:

number

public static hard(arr: Uint8Array): Promise<Hash> source

this method was deprecated.

Params:

NameTypeAttributeDescription
arr Uint8Array

Return:

Promise<Hash>

public static isHash(o: Hash): boolean source

Params:

NameTypeAttributeDescription
o Hash

Return:

boolean

public static light(arr: Uint8Array): Hash source

this method was deprecated.

Params:

NameTypeAttributeDescription
arr Uint8Array

Return:

Hash

public static sha256(arr: Uint8Array): Hash source

Params:

NameTypeAttributeDescription
arr Uint8Array

Return:

Hash

public static sha512(arr: Uint8Array): Hash source

Params:

NameTypeAttributeDescription
arr Uint8Array

Return:

Hash

public static unserialize(buf: SerialBuffer, algorithm: Hash.Algorithm): Hash source

Params:

NameTypeAttributeDescription
buf SerialBuffer
algorithm Hash.Algorithm
  • optional

Return:

Hash

Public Members

public get algorithm: Hash.Algorithm source

public get array: Uint8Array source

public get serializedSize: number source

Public Methods

public equals(o: Serializable): boolean source

Override:

Serializable#equals

Params:

NameTypeAttributeDescription
o Serializable

Return:

boolean

public serialize(buf: SerialBuffer): SerialBuffer source

Override:

Serializable#serialize

Params:

NameTypeAttributeDescription
buf SerialBuffer
  • optional

Return:

SerialBuffer

public subarray(begin: number, end: number): Uint8Array source

Params:

NameTypeAttributeDescription
begin number
end number

Return:

Uint8Array

public toPlain(): string source

Return:

string