-
Notifications
You must be signed in to change notification settings - Fork 12
Home
- CryptoApi
-
Main class
- BaseHasher
- 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 ⇐
BaseHasher -
Md2 hasher
-
Md4 ⇐
BaseHasher -
Md4 hasher
-
HasherInterface
- instance
- static
Kind: instance class of HasherInterface
Process one block
Kind: static method of HasherInterface
| Param | Type |
|---|---|
| block | Array.<number> |
HasherInterface.finalize() ⇒ HashArray
Finalize hash computing
Kind: static method of HasherInterface
Kind: global interface
Access: public
-
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.Hashers : Hashers
Kind: static property of CryptoApi
CryptoApi.Encodes : Encodes
Kind: static property of CryptoApi
CryptoApi.Tools : Tools
Kind: static property of CryptoApi
CryptoApi.BaseHasher : BaseHasher
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) ⇒ BaseHasher
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> |
Kind: global class
Access: public
-
BaseHasher
- new BaseHasher(name, options)
-
.length :
number -
.state :
Object -
.unitSize :
number -
.unitOrder :
number -
.blockSize :
number - .processBlock(block)
-
.finalize() ⇒
HashArray -
.getState() ⇒
Object -
.setState(state) ⇒
BaseHasher -
.update(message) ⇒
BaseHasher - .process()
| Param | Type |
|---|---|
| name | string |
| options | Object |
Length of message
Kind: static property of BaseHasher
All algorithm variables that changed during process
Kind: static property of BaseHasher
Size of unit in bytes (4 = 32 bits)
Kind: static property of BaseHasher
Bytes order in unit 0 - normal 1 - reverse
Kind: static property of BaseHasher
Size of block in units
Kind: static property of BaseHasher
Process ready block
Kind: static method of BaseHasher
| Param | Type |
|---|---|
| block | Array.<number> |
BaseHasher.finalize() ⇒ HashArray
Process last block and return hash
Kind: static method of BaseHasher
Returns: HashArray - hash
Return current state
Kind: static method of BaseHasher
BaseHasher.setState(state) ⇒ BaseHasher
Set state
Kind: static method of BaseHasher
| Param | Type |
|---|---|
| state | Object |
BaseHasher.update(message) ⇒ BaseHasher
Update message
Kind: static method of BaseHasher
| Param | Type |
|---|---|
| message |
string | Array.<number>
|
Process ready blocks
Kind: static method of BaseHasher
Encode HashArray
Kind: global class
Access: public
| Param | Type |
|---|---|
| hash | HashArray |
Kind: instance class of BaseEncode
| Param | Type |
|---|---|
| hash | HashArray |
constructor.hash : HashArray
Kind: instance property of constructor
Properties
| Name |
|---|
| hash |
Collection of hashers
Kind: global class
Kind: static property of Hashers
Kind: static method of Hashers
| Param | Type |
|---|---|
| name | string |
| hasher | BaseHasher |
Hashers.add(name, options) ⇒ HasherInterface
Kind: static method of Hashers
| Param | Type |
|---|---|
| name | string |
| options | Object |
Collection of encodes
Kind: global class
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 ⇐ BaseHasher
Md2 hasher
Kind: global class
Extends: BaseHasher
Implements: HasherInterface
-
Md2 ⇐
BaseHasher-
instance
- .constructor
-
.piSubst :
Array.<number> -
.unitSize :
number
-
static
-
.state.hash :
Array.<number> -
.state.checksum :
Array.<number> - .processBlock(block)
-
.finalize() ⇒
HashArray
-
.state.hash :
-
instance
Kind: instance class of Md2
Implements: constructor
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> |
Md2.finalize() ⇒ HashArray
Kind: static method of Md2
Md4 ⇐ BaseHasher
Md4 hasher
Kind: global class
Extends: BaseHasher
Kind: static property of Md4
Hash state
Kind: static property of state
Transform constants
Kind: static constant of Md4
Hasher name
Message
Kind: global variable