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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
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:
Name | Type | Attribute | Description |
raw | string |
Return:
string |