Home Manual Reference Source

Function

Static Public Summary
public

add32(a: *, b: *)

Adds to 32-bit signed integers.

public

big32(a: *, o: *): *

Construct a 32-bit signed integer from 4 bytes.

public

get32(w: *): *

Creates a 32-bit signed integer from anything.

public

lil32(a: *, o: *): *

public

rotl32(word: *, shift: *): *

Left rotate for 32-bit unsigned integers

public

rotr32(word: *, shift: *): *

Right rotate for 32-bit unsigned integers

public

sqrt32(n: *): *

public

usqrt32(n: *): *

Static Public

public add32(a: *, b: *) source

Adds to 32-bit signed integers.

Params:

NameTypeAttributeDescription
a *
b *

public big32(a: *, o: *): * source

Construct a 32-bit signed integer from 4 bytes.

Params:

NameTypeAttributeDescription
a *
o *

Return:

*

public get32(w: *): * source

Creates a 32-bit signed integer from anything.

Params:

NameTypeAttributeDescription
w *

Return:

*

Example:

get32(0xFFFFFFFF); // -1

public lil32(a: *, o: *): * source

Params:

NameTypeAttributeDescription
a *
o *

Return:

*

public rotl32(word: *, shift: *): * source

Left rotate for 32-bit unsigned integers

  • used in md5 and sha1

Params:

NameTypeAttributeDescription
word *
shift *

Return:

*

public rotr32(word: *, shift: *): * source

Right rotate for 32-bit unsigned integers

Params:

NameTypeAttributeDescription
word *
shift *

Return:

*

public sqrt32(n: *): * source

Params:

NameTypeAttributeDescription
n *

Return:

*

public usqrt32(n: *): * source

Params:

NameTypeAttributeDescription
n *

Return:

*