Home Reference Source Test

Function

Static Public Summary
public

fromArrayBuffer(buffer: ArrayBuffer): string

Convert ArrayBuffer to binary input for hasher

public

fromUtf(message: string): string

Convert UTF8/UTF16 string to binary input for hasher

public

rotateLeft(x: number, n: number): number

Rotate x to n bits left

public

rotateRight(x: number, n: number): number

Rotate x to n bits right

public

rotateRight64hi(hi: number, lo: number, n: number): number

Rotate 64bit to n bits right and return hi

public

rotateRight64lo(hi: number, lo: number, n: number): number

Rotate 64bit to n bits right and return lo

public

toBase64(raw: string): string

Convert binary result of hash to Base64

public

toHex(raw: string): string

Convert binary result of hash to hex

Static Public

public fromArrayBuffer(buffer: ArrayBuffer): string source

import {fromArrayBuffer} from 'crypto-api/src/encoder/array-buffer.mjs'

Convert ArrayBuffer to binary input for hasher

Params:

NameTypeAttributeDescription
buffer ArrayBuffer

Return:

string

public fromUtf(message: string): string source

import {fromUtf} from 'crypto-api/src/encoder/utf.mjs'

Convert UTF8/UTF16 string to binary input for hasher

Params:

NameTypeAttributeDescription
message string

Return:

string

public rotateLeft(x: number, n: number): number source

import {rotateLeft} from 'crypto-api/src/tools/tools.mjs'

Rotate x to n bits left

Params:

NameTypeAttributeDescription
x number
n number

Return:

number

public rotateRight(x: number, n: number): number source

import {rotateRight} from 'crypto-api/src/tools/tools.mjs'

Rotate x to n bits right

Params:

NameTypeAttributeDescription
x number
n number

Return:

number

public rotateRight64hi(hi: number, lo: number, n: number): number source

import {rotateRight64hi} from 'crypto-api/src/tools/tools.mjs'

Rotate 64bit to n bits right and return hi

Params:

NameTypeAttributeDescription
hi number
lo number
n number

Return:

number

public rotateRight64lo(hi: number, lo: number, n: number): number source

import {rotateRight64lo} from 'crypto-api/src/tools/tools.mjs'

Rotate 64bit to n bits right and return lo

Params:

NameTypeAttributeDescription
hi number
lo number
n number

Return:

number

public toBase64(raw: string): string source

import {toBase64} from 'crypto-api/src/encoder/base64.mjs'

Convert binary result of hash to Base64

Params:

NameTypeAttributeDescription
raw string

Return:

string

public toHex(raw: string): string source

import {toHex} from 'crypto-api/src/encoder/hex.mjs'

Convert binary result of hash to hex

Params:

NameTypeAttributeDescription
raw string

Return:

string