-
Notifications
You must be signed in to change notification settings - Fork 12
Home
- CryptoApi
-
Main class
- BaseEncode
-
Encode HashArray
- Hashers
-
Collection of hashers
- Encodes
-
Collection of encodes
- Tools
-
Helper with some methods
- HashArray
-
Array of hash bytes
-
Hex ⇐
BaseEncode -
Hex encode
-
Md2 ⇐
HasherInterface -
Md2 hasher
-
Md4 ⇐
HasherInterface -
Md4 hasher
-
EncodeInterface
- instance
-
static
-
.stringify() ⇒
string
-
.stringify() ⇒
Kind: instance class of EncodeInterface
| Param | Type |
|---|---|
| hash | HashArray |
Stringify hash
Kind: static method of EncodeInterface
Main class
Kind: global class
Access: public
-
CryptoApi
- instance
-
static
-
.Hashers :
Hashers -
.Encodes :
Encodes -
.Tools :
Tools -
.BaseEncode :
BaseEncode -
.hash(algo, message, options) ⇒
HashArray -
.hasher(algo, options) ⇒
HasherInterface -
.hashArray(hash) ⇒
HashArray
-
.Hashers :
Kind: instance class of CryptoApi
| 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 |
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> |
Encode HashArray
Kind: global class
-
BaseEncode
- new BaseEncode(hash)
- instance
-
static
-
.stringify() ⇒
string
-
.stringify() ⇒
| Param | Type |
|---|---|
| hash | HashArray |
Kind: instance class of BaseEncode
| Param | Type |
|---|---|
| hash | HashArray |
constructor.hash : HashArray
Kind: instance property of constructor
Properties
| Name |
|---|
| hash |
Stringify hash
Kind: static method of BaseEncode
Collection of hashers
Kind: global class
-
Hashers
-
.hashers :
Object - .add(name, hasher)
-
.add(name, options) ⇒
HasherInterface
-
.hashers :
Kind: static property of Hashers
Kind: static method of Hashers
| Param | Type |
|---|---|
| name | string |
| hasher | HasherInterface |
Kind: static method of Hashers
| Param | Type |
|---|---|
| name | string |
| options | Object |
Collection of encodes
Kind: global class
-
Encodes
-
.encodes :
Object - .add(name, encode)
-
.get(name, hash) ⇒
BaseEncode
-
.encodes :
Kind: static property of Encodes
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 |
Helper with some methods
Kind: global class
-
Tools
-
.rotateLeft(x, n) ⇒
number -
.rotateLeft(x, n) ⇒
number
-
.rotateLeft(x, n) ⇒
Rotate x to n bits left
Kind: static method of Tools
| Param | Type |
|---|---|
| x | number |
| n | number |
Rotate x to n bits right
Kind: static method of Tools
| Param | Type |
|---|---|
| x | number |
| n | number |
Array of hash bytes
Kind: global class
Access: public
Instanceof: Array
| Param | Type |
|---|---|
| hash | Array.<number> |
| Encodes | Encodes |
Hex ⇐ BaseEncode
Hex encode
Kind: global class
Extends: BaseEncode
Implements: EncodeInterface
-
Hex ⇐
BaseEncode- new Hex(hash)
- instance
-
static
-
.stringify() ⇒
string
-
.stringify() ⇒
| Param | Type |
|---|---|
| hash | HashArray |
Kind: instance class of Hex
Implements: constructor
| Param | Type |
|---|---|
| hash | HashArray |
Kind: static method of Hex
Md2 hasher
Kind: global class
Extends: HasherInterface
-
Md2 ⇐
HasherInterface- instance
-
static
-
.state.hash :
Array.<number> -
.state.checksum :
Array.<number> - .processBlock(block)
- .finalize()
-
.state.hash :
Constants from Pi
Kind: instance property of Md2
Link: https://github.com/e-sushi/MD2-S-box-creator
Size of unit = 1 byte
Kind: instance property of Md2
Hash state
Kind: static property of Md2
Checksum
Kind: static property of Md2
Kind: static method of Md2
| Param | Type |
|---|---|
| block | Array.<number> |
Kind: static method of Md2
Md4 hasher
Kind: global class
Extends: HasherInterface
Kind: static property of Md4
Hash state
Kind: static property of state
Transform constants
Kind: static constant of Md4