Class Gateway

Namespace: Keychain

Assemblies: libkeychain.dll

Inheritance: Object → Gateway

Gateway

Gateway performs application-level cryptographic operations encrypt, decrypt, sign, and verify.

Constructor Summary

Constructor

Gateway(string dbPath, string configFile, string dropSqlFile, string createSqlFile, bool forceCreation)

Instance Methods

Return type Method and Description

int

addSignature(out string newlySignedData, string signedData)

Add a signature to a signed message.

Asset

createAsset(string assetName)

Create/issue custom digital asset

int

createContact(out Contact contact, string contactName, string contactSubname, Uri uri )

Create a contact.

int

createPersona(out Persona persona, string personaName, string personaSubname, SecurityLevel securityLevel)

Create a new persona.

int

decrypt(out string clearText, string cipherText)

Decrypt to a string.

int

decrypt(out byte[] clearText, string cipherText)

Decrypt to a byte array.

int

decryptThenVerify(out List<Verification> verifyResults, out string clearText, string cipherText)

Decrypt then verify data that has been signed and encrypted as a string.

int

decryptThenVerify(out List< Verification > verifyResults, out byte[] clearText, string cipherText)

Decrypt then verify data that has been signed and encrypted as a byte array.

int

deleteFacade(Facade)

Delete a facade (persona or contact).

int

encrypt(out string cipherText, string clearText, Contact[] contacts)

Encrypt a string so that it can be decrypted by the given contacts.

int

encrypt(out string cipherText, byte[] clearText, Contact[] contacts)

Encrypt a byte array so that it can be decrypted by the given contacts.

int

forceUpdateCache()

Force update blockchain cache state.

int

getActivePersona(out Persona persona)

Get the active persona.

int

getContacts(out Contact[] contacts)

Get the set of contacts for the current active persona.

int

getPersonas(out Persona[] personas)

Get set of personas.

int

hash(out string hash, byte[] data)

Hash data from a byte array.

int

hash(out string hash, string data)

Hash data from a string.

int

renameFacade(Facade, string name, string subName)

Rename a facade (persona or contact).

int

renewCertificate(Persona)

Renew the given persona’s certificate.

int

seed(out string address, out string mnemonic)

Seed the private key pool and generate mnemonic recovery string.

int

setActivePersona(Persona persona)

Set the active persona.

int

sign(out string signedData, string cipherText)

Sign a string.

int

sign(out string signedData, byte[] data)

Sign a byte array.

int

signThenEncrypt(out string cipherText, string clearText, Contact[] contacts)

Sign then encrypt a string so that it can be decrypted (and verified) by the given contacts.

int

signThenEncrypt(out string cipherText, byte[] clearText, Contact[] contacts)

Sign then encrypt a byte array so that it can be decrypted (and verified) by the given contacts.

int

transferAsset(out Transaction trxn, Asset asset, Contact receiver, long amount)

Create a transaction that sends the asset to the specified receiver

int

updateLedger(out Transaction response, Transaction trxn)

Update local ledger with transaction from peers.

int

verify(out List<Verification>) verifyResult, out string originalData, string signedData)

Verify the signature(s) of a signed string.

int

verify(out List<Verification>) verifyResult, out byte[] signedData, string signedData)

Verify the signature(s) of a signed byte array.