@cuser/crypto v0.0.36
Status
@cuser/crypto
Index
Classes
Variables
Functions
Variables
pki
• pki: any
Defined in keygen.js:6
Functions
createBearer
▸ Const
createBearer(secret
: string, opts
: any): CoreCryptoBearer
Defined in bearer.js:45
Parameters:
Name | Type | Description |
---|---|---|
secret | string | |
opts | any |
Returns: CoreCryptoBearer
createHash
▸ Const
createHash(secret
: string, encoding?
: string): Buffer & string
Defined in hash.js:9
Returns a 32 bytes fixed length hash from a secret word
Parameters:
Name | Type | Default value |
---|---|---|
secret | string | - |
encoding | string | "buffer" |
Returns: Buffer & string
createKeygen
▸ Const
createKeygen(node
: IPFSAPI | Promise\, secret
: string, opts
: CuserCryptoKeygenOptions): CuserCryptoKeygen
Defined in keygen.js:55
Parameters:
Name | Type |
---|---|
node | IPFSAPI | Promise\ |
secret | string |
opts | CuserCryptoKeygenOptions |
Returns: CuserCryptoKeygen
Class: CoreCryptoBearer
Hierarchy
- CoreCryptoBearer
Index
Constructors
Constructors
constructor
+ new CoreCryptoBearer(secret
: string, opts
: any): CoreCryptoBearer
Defined in bearer.js:14
Parameters:
Name | Type | Description |
---|---|---|
secret | string | |
opts | any |
Returns: CoreCryptoBearer
Class: CuserCryptoCypher
Hierarchy
- CuserCryptoCypher
Class: CuserCryptoKeygen
Generate rsa pair keys from ipfs
Hierarchy
- CuserCryptoKeygen
Index
Constructors
Methods
Constructors
constructor
+ new CuserCryptoKeygen(node
: IPFSAPI | Promise\, secret
: string, opts
: CuserCryptoKeygenOptions): CuserCryptoKeygen
Defined in keygen.js:16
Parameters:
Name | Type | Description |
---|---|---|
node | IPFSAPI | Promise\ | |
secret | string | |
opts | CuserCryptoKeygenOptions |
Returns: CuserCryptoKeygen
Methods
generateKeys
▸ generateKeys(key
: string): Promise\<{ privateKey: any ; publicKey: any }>
Defined in keygen.js:34
Parameters:
Name | Type |
---|---|
key | string |
Returns: Promise\<{ privateKey: any ; publicKey: any }>
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago