Class: BufferUtils
Constructors
new BufferUtils()
new BufferUtils():
BufferUtils
Returns
Properties
_BASE64_LOOKUP
static
_BASE64_LOOKUP:string
[]
Defined in
@nimiq/core/lib/index.d.ts:54
BASE32_ALPHABET
static
BASE32_ALPHABET:object
NIMIQ
NIMIQ:
string
RFC4648
RFC4648:
string
RFC4648_HEX
RFC4648_HEX:
string
Defined in
@nimiq/core/lib/index.d.ts:48
BASE64_ALPHABET
static
BASE64_ALPHABET:string
Defined in
@nimiq/core/lib/index.d.ts:47
HEX_ALPHABET
static
HEX_ALPHABET:string
Defined in
@nimiq/core/lib/index.d.ts:53
Methods
_base64encodeChunk()
static
_base64encodeChunk(u8
,start
,end
):string
Parameters
• u8: Uint8Array
• start: number
• end: number
Returns
string
Defined in
@nimiq/core/lib/index.d.ts:60
_base64fromByteArray()
static
_base64fromByteArray(u8
):string
Parameters
• u8: Uint8Array
Returns
string
Defined in
@nimiq/core/lib/index.d.ts:61
_codePointTextDecoder()
static
_codePointTextDecoder(buffer
):string
Parameters
• buffer: Uint8Array
Returns
string
Defined in
@nimiq/core/lib/index.d.ts:58
_tripletToBase64()
static
_tripletToBase64(num
):string
Parameters
• num: number
Returns
string
Defined in
@nimiq/core/lib/index.d.ts:59
compare()
static
compare(a
,b
):number
Returns -1 if a is smaller than b, 1 if a is larger than b, 0 if a equals b. Shorter arrays are always considered smaller than longer ones.
Parameters
• a: TypedArray
• b: TypedArray
Returns
number
Defined in
@nimiq/core/lib/index.d.ts:80
equals()
static
equals(a
,b
):boolean
Parameters
• a: TypedArray
• b: TypedArray
Returns
boolean
Defined in
@nimiq/core/lib/index.d.ts:75
fromAny()
static
fromAny(o
,length
?):SerialBuffer
Parameters
• o: string
| Uint8Array
• length?: number
Returns
Defined in
@nimiq/core/lib/index.d.ts:74
fromBase32()
static
fromBase32(base32
,alphabet
?):Uint8Array
Parameters
• base32: string
• alphabet?: string
Returns
Uint8Array
Defined in
@nimiq/core/lib/index.d.ts:67
fromBase64()
static
fromBase64(base64
,length
?):SerialBuffer
Parameters
• base64: string
• length?: number
Returns
Defined in
@nimiq/core/lib/index.d.ts:63
fromBase64Url()
static
fromBase64Url(base64
,length
?):SerialBuffer
Parameters
• base64: string
• length?: number
Returns
Defined in
@nimiq/core/lib/index.d.ts:65
fromHex()
static
fromHex(hex
,length
?):SerialBuffer
Parameters
• hex: string
• length?: number
Returns
Defined in
@nimiq/core/lib/index.d.ts:69
fromUtf8()
static
fromUtf8(str
):Uint8Array
Parameters
• str: string
Returns
Uint8Array
Defined in
@nimiq/core/lib/index.d.ts:71
toBase32()
static
toBase32(buf
,alphabet
?):string
Parameters
• buf: Uint8Array
• alphabet?: string
Returns
string
Defined in
@nimiq/core/lib/index.d.ts:66
toBase64()
static
toBase64(buffer
):string
Parameters
• buffer: Uint8Array
Returns
string
Defined in
@nimiq/core/lib/index.d.ts:62
toBase64Url()
static
toBase64Url(buffer
):string
Parameters
• buffer: Uint8Array
Returns
string
Defined in
@nimiq/core/lib/index.d.ts:64
toHex()
static
toHex(buffer
):string
Parameters
• buffer: Uint8Array
Returns
string
Defined in
@nimiq/core/lib/index.d.ts:68
toUtf8()
static
toUtf8(buf
):string
Parameters
• buf: TypedArray
Returns
string
Defined in
@nimiq/core/lib/index.d.ts:73
xor()
static
xor(a
,b
):Uint8Array
Parameters
• a: Uint8Array
• b: Uint8Array
Returns
Uint8Array
Defined in
@nimiq/core/lib/index.d.ts:81