Skip to content
nf404 edited this page Dec 10, 2015 · 24 revisions

Classes

CryptoApi

Main class

BaseEncode

Encode HashArray

Hashers

Collection of hashers

Encodes

Collection of encodes

Tools

Helper with some methods

HashArray

Array of hash bytes

HexBaseEncode

Hex encode

Md2HasherInterface

Md2 hasher

Md4HasherInterface

Md4 hasher

## EncodeInterface **Kind**: global interface **Access:** public

encodeInterface.constructor

Kind: instance class of EncodeInterface

new EncodeInterface.prototype.constructor(hash)

Param Type
hash HashArray

EncodeInterface.stringify() ⇒ string

Stringify hash

Kind: static method of EncodeInterface

CryptoApi

Main class

Kind: global class
Access: public

cryptoApi.HasherInterface

Kind: instance class of CryptoApi

new HasherInterface(name, options)

Param Type
name string
options Object

CryptoApi.Hashers : Hashers

Kind: static property of CryptoApi

CryptoApi.Encodes : Encodes

Kind: static property of CryptoApi

CryptoApi.Tools : Tools

Kind: static property of CryptoApi

CryptoApi.BaseEncode : BaseEncode

Kind: static property of CryptoApi

CryptoApi.hash(algo, message, options) ⇒ HashArray

Hash message with algo

Kind: static method of CryptoApi
Returns: HashArray - hash
Access: public

Param Type
algo string
message string
options Object

CryptoApi.hasher(algo, options) ⇒ HasherInterface

Get new Hasher object

Kind: static method of CryptoApi
Access: public

Param Type
algo string
options Object

CryptoApi.hashArray(hash) ⇒ HashArray

Get new HashArray

Kind: static method of CryptoApi
Access: public

Param Type
hash Array.<number>

BaseEncode

Encode HashArray

Kind: global class

new BaseEncode(hash)

Param Type
hash HashArray

baseEncode.constructor

Kind: instance class of BaseEncode

new BaseEncode.prototype.constructor(hash)

Param Type
hash HashArray

constructor.hash : HashArray

Kind: instance property of constructor
Properties

Name
hash

BaseEncode.stringify() ⇒ string

Stringify hash

Kind: static method of BaseEncode

Hashers

Collection of hashers

Kind: global class

Hashers.hashers : Object

Kind: static property of Hashers

Hashers.add(name, hasher)

Kind: static method of Hashers

Param Type
name string
hasher HasherInterface

Hashers.add(name, options) ⇒ HasherInterface

Kind: static method of Hashers

Param Type
name string
options Object

Encodes

Collection of encodes

Kind: global class

Encodes.encodes : Object

Kind: static property of Encodes

Encodes.add(name, encode)

Kind: static method of Encodes

Param Type
name string
encode BaseEncode

Encodes.get(name, hash) ⇒ BaseEncode

Kind: static method of Encodes

Param Type
name string
hash HashArray

Tools

Helper with some methods

Kind: global class

Tools.rotateLeft(x, n) ⇒ number

Rotate x to n bits left

Kind: static method of Tools

Param Type
x number
n number

Tools.rotateLeft(x, n) ⇒ number

Rotate x to n bits right

Kind: static method of Tools

Param Type
x number
n number

HashArray

Array of hash bytes

Kind: global class
Access: public
Instanceof: Array

new HashArray(hash, Encodes)

Param Type
hash Array.<number>
Encodes Encodes

Hex ⇐ BaseEncode

Hex encode

Kind: global class
Extends: BaseEncode
Implements: EncodeInterface

new Hex(hash)

Param Type
hash HashArray

hex.constructor

Kind: instance class of Hex
Implements: constructor

new BaseEncode.prototype.constructor(hash)

Param Type
hash HashArray

Hex.stringify() ⇒ string

Kind: static method of Hex

Md2 ⇐ HasherInterface

Md2 hasher

Kind: global class
Extends: HasherInterface

md2.piSubst : Array.<number>

Constants from Pi

Kind: instance property of Md2
Link: https://github.com/e-sushi/MD2-S-box-creator

md2.unitSize : number

Size of unit = 1 byte

Kind: instance property of Md2

Md2.state.hash : Array.<number>

Hash state

Kind: static property of Md2

Md2.state.checksum : Array.<number>

Checksum

Kind: static property of Md2

Md2.processBlock(block)

Kind: static method of Md2

Param Type
block Array.<number>

Md2.finalize()

Kind: static method of Md2

Md4 ⇐ HasherInterface

Md4 hasher

Kind: global class
Extends: HasherInterface

  • Md4HasherInterface

Md4.state : Object

Kind: static property of Md4

state.hash : Array.<number>

Hash state

Kind: static property of state

Md4.S : Array.<number>

Transform constants

Kind: static constant of Md4

Clone this wiki locally