const ubiq = require('ubiq-security')
// Explicitly set the credentials.
const credentials = new Credentials('', '', '')
// Encrypt a block of data.
const encrypted_data = await ubiq.encrypt(credentials, plainntext_data)
// Decrypt a block of data.
const plainttext_data = await ubiq.decrypt(credentials, encrypted_data)
require 'ubiq-security'
include Ubiq
# Explicitly set the credentials.
credentials = Credentials(access_key_id = "...", secret_signing_key = "...", secret_crypto_access_key = "...")
# Encrypt a block of data.
encrypted_data = encrypt(credentials, plaintext_data)
# Decrypt a block of data.
plaintext_data = decrypt(credentials, encrypted_data)
# Require the Security Client.
import ubiq_security as ubiq
# Explicitly set the credentials.
credentials = ubiq.credentials(access_key_id = "...", secret_signing_key = "...", secret_crypto_access_key = "...")
# Encrypt a block of data.
encrypted_data = ubiq.encrypt(credentials, plaintext_data)
# Decrypt a block of data.
plaintext_data = ubiq.decrypt(credentials, encrypted_data)
#include
struct ubiq_platform_credentials * creds = NULL;
void * ptbuf = NULL, * ctbuf = NULL;
size_t ptlen = 0, ctlen = 0;
/*
* load credentials from the environment
* or the credentials file
*/
ubiq_platform_credentials_create(creds);
/* initialize ptbuf and ptlen */
...
/* Encrypt a block of data. */
ubiq_platform_encrypt(creds, ptbuf, ptlen, ctbuf, ctlen);
/* Decrypt a block of data. */
ubiq_platform_decrypt(creds, ctbuf, ctlen, ptbuf, ptlen);
free(ctbuf);
free(ptbuf);
ubiq_platform_credentials_destroy(creds);
#include
/*
* load credentials from the environment
* or the credentials file
*/
ubiq::platform::credentials creds;
std::vector ptbuf, ctbuf;
/* initialize ptbuf */
...
/* Encrypt a block of data. */
ctbuf = ubiq::platform::encrypt(creds, ptbuf.data(), ptbuf.size());
/* Decrypt a block of data. */
ptbuf = ubiq::platform::decrypt(creds, ctbuf.data(), ctbuf.size());
using UbiqSecurity;
/* explicitly set the credentials */
var credentials = UbiqFactory.CreateCredentials(accessKeyId: "...", secretSigningKey: "...", secretCryptoAccessKey: "...");
/* Encrypt a block of data. */
byte[] plainBytes = ...;
byte[] encryptedBytes = await UbiqEncrypt.EncryptAsync(credentials, plainBytes);
/* Decrypt a block of data. */
plainBytes = await UbiqDecrypt.DecryptAsync(credentials, encryptedBytes);
import com.ubiqsecurity.UbiqCredentials;
import com.ubiqsecurity.UbiqDecrypt;
import com.ubiqsecurity.UbiqEncrypt;
import com.ubiqsecurity.UbiqFactory;
// Explicitly set the credentials.
UbiqCredentials credentials = UbiqFactory.createCredentials("", "", "", null);
// Encrypt a block of data.
byte[] plainBytes = ...;
byte[] encryptedBytes = UbiqEncrypt.encrypt(credentials, plainBytes);
// Decrypt a block of data.
plainBytes = UbiqDecrypt.decrypt(credentials, encryptedBytes);
import "gitlab.com/ubiqsecurity/ubiq-go"
var plaintext []byte = ...
// load the default credentials
credentials, _ := ubiq.NewCredentials()
// encrypt a block of data
ciphertext, _ := ubiq.Encrypt(credentials, plaintext)
// decrypt a block of data
plaintext, _ := ubiq.Decrypt(credentials, ciphertext)
# Initialize credentials into the current session
call ubiq_begin_fpe_session(dataset_names, access_key,
secret_key, secret_crypto_access_key);
# Encrypt a block of data.
select ubiq_fpe_encrypt_cache(plain_text, dataset_name);
# Decrypt a block of data.
select ubiq_fpe_decrypt_cache(cipher_text, dataset_name);
# Querying encrypted data stored in a table
select name, address, ubiq_fpe_decrypt_cache(sensitive_info, dataset_name) from secure_table;
# Inserting encrypted data to a table
insert into secure_table (name, address, sensitive_info) values ("Jeff", "101 Anywhere St",
ubiq_fpe_encrypt_cache(sensitive_info, dataset_name));
# Tear down the Ubiq Session
call ubiq_close_fpe_session(access_key, secret_key);
Integrations galore
Integrations are available for the most popular programming languages, databases and warehouses, API gateways, and SaaS platforms.
Learn more >