# Crypto API
TIP
This is an advanced API and we assume that most of our users won't know what to do with it (for a fact, we are sure most of you won't need it 😉) But for those of you who do, this might be represent a powerful addon to your application.
# Hash
Generate the hash value of an arbitrary input value.
Example
"MySuperPass123"
âž” "1bace463fe60bc5d431dc73e2f0ba8fab77c28dbfb3b41a1096d8cd30b4e756b"
API Base URL
Parameters
Name | Type | Description | Required |
---|---|---|---|
value | String | Value to hash. Can by anything. | Yes |
algo | String | Hashing algorithm to apply (Default: "sha256" ). | No |
enc | String | Encoding of hash output (Default: "hex" ). | No |
Outputs
Name | Type | Description |
---|---|---|
hash | String | Hash value output. |
# Generate Key Pair
Randomly generates an RSA key pair of 4096 bit that can be used for asymmetric cryptography.
Example (shortened)
"-----BEGIN PUBLIC KEY-----\nMIICIjANBgk...\n-----END PUBLIC KEY-----\n"
, "-----BEGIN PRIVATE KEY-----\nMIIJQgIBA...\n-----END PRIVATE KEY-----\n
API Base URL
Outputs
Name | Type | Description |
---|---|---|
publicKey | String | Public key. |
privateKey | String | Private key. |
# Generate BTC Wallet
Generates the keys to a new Bitcoin wallet. We use bitcoinjs-lib (opens new window) to generate the wallet.
Example (shortened)
"1QFL9ZwAF68Htfnu6LHoTbhnEWpV4QARnv"
, "L4Y3Khss7R5FSYCEj2TJnjBKJx4WUG9dhiwXTbyoL49MAjGXCn4i"
, "03556738b5559b2d1ba5d2d8417dab7deffdd665d18f73f3fe40f0eb2c3fb35822"
API Base URL
Outputs
Name | Type | Description |
---|---|---|
address | String | Public Bitcoin wallet address that can be used to send Bitcoins to. |
privateKey | String | Private key to Bitcoin wallet, enables creating transactions. |
publicKey | String | Rarely needed. The Bitcoin address deviates itself from this value. |