Home Reference Source Test
public class | source

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

fromUtf8(str: string): Uint8Array

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

toBinary(bytes: *): 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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
a T
b *

Return:

T

public static equals(a: *, b: *): boolean source

Params:

NameTypeAttributeDescription
a *
b *

Return:

boolean

public static fromAscii(string: string): Uint8Array source

Params:

NameTypeAttributeDescription
string string

Return:

Uint8Array

public static fromBase32(base32: string, alphabet: string): Uint8Array source

Params:

NameTypeAttributeDescription
base32 string
alphabet string
  • optional

Alphabet to use

Return:

Uint8Array

public static fromBase64(base64: string): SerialBuffer source

Params:

NameTypeAttributeDescription
base64 string

Return:

SerialBuffer

public static fromBase64Url(base64: string): SerialBuffer source

Params:

NameTypeAttributeDescription
base64 string

Return:

SerialBuffer

public static fromHex(hex: string): SerialBuffer source

Params:

NameTypeAttributeDescription
hex string

Return:

SerialBuffer

public static fromUtf8(str: string): Uint8Array source

Params:

NameTypeAttributeDescription
str string

Return:

Uint8Array

public static toAscii(buffer: *): string source

Params:

NameTypeAttributeDescription
buffer *

Return:

string

public static toBase32(buf: Uint8Array, alphabet: string): string source

Params:

NameTypeAttributeDescription
buf Uint8Array
alphabet string
  • optional

Alphabet to use

Return:

string

public static toBase64(buffer: *): string source

Params:

NameTypeAttributeDescription
buffer *

Return:

string

public static toBase64Url(buffer: *): string source

Params:

NameTypeAttributeDescription
buffer *

Return:

string

public static toBinary(bytes: *): string source

Params:

NameTypeAttributeDescription
bytes *

Return:

string

public static toHex(buffer: *): string source

Params:

NameTypeAttributeDescription
buffer *

Return:

string

public static xor(a: Uint8Array, b: Uint8Array): Uint8Array source

Params:

NameTypeAttributeDescription
a Uint8Array
b Uint8Array

Return:

Uint8Array