Class gateway
#include <keychain/gateway/gateway.hpp>
Namespace: keychain
Inheritance: gateway
Description
gateway performs application-level cryptographic operations encrypt, decrypt, sign, and verify.
Through the gateway users create personas, contacts, and then execute the cryptographic operations with respect to those entities.
The gateway works together with the monitor. The gateway executes actions, and the monitor keeps the underlying state of personas, contacts and their associated keychains up to date.
Since: v2.0
Public Constructors
| Constructor |
|---|
|
Public Member Functions
| Return type | Method and Description |
|---|---|
|
Adds the active persona signature alongside others in a signed message |
|
Create a |
|
Create a new |
|
Decrypts a ciphertext to a cleartext string along with the encoding used to encrypt |
|
Decrypts a ciphertext like |
|
Deletes a |
|
Encrypts a string so that it can be decrypted by the given contacts |
|
Force updates blockchain cache state |
|
Gets the active |
|
Gets the set of |
|
Gets all |
|
Returns a hash of the string data |
|
Renames a |
|
Seeds the private key pool and generates a mnemonic recovery string |
|
Sets the active |
|
Signs a message |
|
Signs then encrypts a message |
|
Verifies the signatures of a signed message |
|
Decrypts a ciphertext to a cleartext string along with the encoding used to encrypt. |
|
Decrypts a ciphertext like decrypt, then verifies that all signatures are valid |
Static Member Functions
| Return type | Method and Description |
|---|---|
|
Creates a Keychain |
Public Member Functions Detail
add_signature
|
|
Given a message The message |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
create_contact
|
|
Create a This method goes to the blockchain with the provided |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
create_persona
|
|
Create a new This method is asynchronous with respect to the underlying blockchain and it will return a new |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
decrypt
|
|
Decrypts a ciphertext to a cleartext string along with the encoding used to encrypt. |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
decrypt_then_verify
|
|
Decrypts a ciphertext like |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
delete_facade
|
|
Deletes a |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
encrypt
|
|
Encrypts a string so that it can be decrypted by the given contacts. The string encoding, desired cipher type and public key type are optionally provided. |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
force_update_cache
|
|
Force update blockchain cache state. |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
get_active_persona
|
|
Gets the active |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
get_contacts
|
|
Gets the set of |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
get_personas
|
|
Gets all |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
hash
|
|
Returns a hash of the string data. |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
rename_facade
|
|
Renames a |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
seed
|
|
Seeds the private key pool and generates a mnemonic recovery string. |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
set_active_persona
|
|
Sets the active |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
sign
|
|
Given a message This differs from Given an input that is
This nuance allows for a signatory to attest other signatories, creating tiered attestations. |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
sign_then_encrypt
|
|
Signs then encrypt a string so that it can be decrypted (and verified) by the given contacts. |
|
Returns: |
|
The Keychain library error code indicating success or failure |
|
verify
Verifies the signatures of a signed message. Results are placed in |
Static Member Functions Detail
init
|
|
Creates a Keychain |
|
Parameters: |
|
|
|
|
|
|
|
|
|
|
|
Returns: |
|
A |
|