BufferUtils
Static Method Summary
Static Public Methods | ||
public static |
compare(a: *, b: *): number |
|
public static |
concatTypedArrays(a: T, b: *): T |
|
public static |
equals(a: *, b: *): boolean |
|
public static |
fromAscii(string: string): Uint8Array |
|
public static |
fromBase32(base32: string, alphabet: string): Uint8Array |
|
public static |
fromBase64(base64: string): SerialBuffer |
|
public static |
fromBase64Url(base64: string): SerialBuffer |
|
public static |
fromHex(hex: string): SerialBuffer |
|
public static |
toAscii(buffer: *): string |
|
public static |
toBase32(buf: Uint8Array, alphabet: string): string |
|
public static |
toBase64(buffer: *): string |
|
public static |
toBase64Url(buffer: *): string |
|
public static |
toHex(buffer: *): string |
|
public static |
xor(a: Uint8Array, b: Uint8Array): Uint8Array |
Static Public Methods
public static compare(a: *, b: *): number source
Params:
Name | Type | Attribute | Description |
a | * | ||
b | * |
Return:
number | 1 if a is smaller than b, 1 if a is larger than b, 0 if a equals b. |
public static concatTypedArrays(a: T, b: *): T source
Params:
Name | Type | Attribute | Description |
a | T | ||
b | * |
Return:
T |
public static equals(a: *, b: *): boolean source
Params:
Name | Type | Attribute | Description |
a | * | ||
b | * |
Return:
boolean |
public static fromAscii(string: string): Uint8Array source
Params:
Name | Type | Attribute | Description |
string | string |
Return:
Uint8Array |
public static fromBase32(base32: string, alphabet: string): Uint8Array source
Params:
Name | Type | Attribute | Description |
base32 | string | ||
alphabet | string |
|
Alphabet to use |
Return:
Uint8Array |
public static fromBase64(base64: string): SerialBuffer source
Params:
Name | Type | Attribute | Description |
base64 | string |
public static fromBase64Url(base64: string): SerialBuffer source
Params:
Name | Type | Attribute | Description |
base64 | string |
public static fromHex(hex: string): SerialBuffer source
Params:
Name | Type | Attribute | Description |
hex | string |
public static toAscii(buffer: *): string source
Params:
Name | Type | Attribute | Description |
buffer | * |
Return:
string |
public static toBase32(buf: Uint8Array, alphabet: string): string source
Params:
Name | Type | Attribute | Description |
buf | Uint8Array | ||
alphabet | string |
|
Alphabet to use |
Return:
string |
public static toBase64(buffer: *): string source
Params:
Name | Type | Attribute | Description |
buffer | * |
Return:
string |
public static toBase64Url(buffer: *): string source
Params:
Name | Type | Attribute | Description |
buffer | * |
Return:
string |
public static toHex(buffer: *): string source
Params:
Name | Type | Attribute | Description |
buffer | * |
Return:
string |
public static xor(a: Uint8Array, b: Uint8Array): Uint8Array source
Params:
Name | Type | Attribute | Description |
a | Uint8Array | ||
b | Uint8Array |
Return:
Uint8Array |