DECENT
Functions
Crypto API

Functions

string graphene::app::crypto_api::info ()
 Get the name of the API. More...
 
public_key_type graphene::app::crypto_api::get_public_key (const string &wif_priv_key)
 Get public key from private key. More...
 
private_key_type graphene::app::crypto_api::wif_to_private_key (const string &wif)
 Convert wif key to private key. More...
 
signed_transaction graphene::app::crypto_api::sign_transaction (signed_transaction trx, const private_key_type &key)
 Sign transaction with given private key. More...
 
memo_data graphene::app::crypto_api::encrypt_message (const std::string &message, const private_key_type &key, const public_key_type &pub, uint64_t nonce=0) const
 Encrypt message. More...
 
std::string graphene::app::crypto_api::decrypt_message (const memo_data::message_type &message, const private_key_type &key, const public_key_type &pub, uint64_t nonce) const
 Decrypt message. More...
 

Detailed Description

Function Documentation

std::string graphene::app::crypto_api::decrypt_message ( const memo_data::message_type message,
const private_key_type key,
const public_key_type pub,
uint64_t  nonce 
) const

Decrypt message.

Parameters
messagethe message to decrypt
keythe private key of sender/receiver
pubthe public key of receiver/sender
noncethe salt number used for message encryption
Returns
decrypted message

Definition at line 445 of file api.cpp.

memo_data graphene::app::crypto_api::encrypt_message ( const std::string &  message,
const private_key_type key,
const public_key_type pub,
uint64_t  nonce = 0 
) const

Encrypt message.

Parameters
messagethe message to encrypt
keythe private key of sender
pubthe public key of receiver
noncethe salt number to use for message encryption (will be generated if zero)
Returns
encrypted memo data

Definition at line 440 of file api.cpp.

public_key_type graphene::app::crypto_api::get_public_key ( const string &  wif_priv_key)

Get public key from private key.

Parameters
wif_priv_keythe wif private key
Returns
corresponding public key

Definition at line 422 of file api.cpp.

string graphene::app::crypto_api::info ( )
inline

Get the name of the API.

Returns
the name of the API

Definition at line 321 of file api.hpp.

signed_transaction graphene::app::crypto_api::sign_transaction ( signed_transaction  trx,
const private_key_type key 
)

Sign transaction with given private key.

Parameters
trxthe transaction to sign
keythe private key to sign the given transaction
Returns
signed transaction

Definition at line 434 of file api.cpp.

private_key_type graphene::app::crypto_api::wif_to_private_key ( const string &  wif)

Convert wif key to private key.

Parameters
wifthe wif key to convert
Returns
private key

Definition at line 427 of file api.cpp.