Take Basis Theory For A Spin
Basis Theory is built to encrypt, decrypt, tokenize, and delegate any payload of data that can be serialized. To show the flexibility of our tokenization platform, the following guide will show you how you can tokenize any payload in an application.
Table of contents
- Register for Basis Theory
- Create an Application
- Download the Sample Application
- Go to Directory
- Run the Application
- Insert Application API Key
- Encrypt your data
- Decide who encrypts
- Retrieve your token
- Decrypt your token
We are pleased to offer you this 10-step guide and sample application to demonstrate how to tokenize data using Basis Theory. This is an excellent way to quickly get started testing Basis Theory end to end. If you’d rather dive right into the API, run on over to the sandbox.
If you prefer to test out our API directly in Postman, you can quickly get started using our official library:
Register for Basis Theory
Sign up and validate your e-mail. You can sign up for a free Basis Theory account here.
Create an Application
Generate your first API key. To generate your first API key head to the portal and click “Create New Application” in the Applications tab. Select the following scopes when creating your API Key
After your API key is generated, copy your API key. You’ll need it for a future step.
Download the Sample Application
Download the sample Basis Theory application. You can download it from GitHub or clone the repository
git clone https://github.com/Basis-Theory/basistheory-sample-app-dotnet.git
Go to Directory
Go to the directory where you downloaded the app. If you used git this should be
Run the Application
Run the application by using the following command
Insert Application API Key
When the app starts add the API key you generated the
Create an Application step.
Encrypt your data
Encrypt your first payload. The app gives you the ability to encrypt text or a file. A basic account is limited to a 1mb payload, so if you do select a file to encrypt make sure it’s under 1mb. After you encrypt and submit the ciphertext via the API, you’ll retrieve a token.
Decide who encrypts
Decide if you want to encrypt your data using a key pair only you have on your computer, or encrypt using a key pair hosted at Basis Theory. If you use a key pair that is only on your machine, all encryption and decryption will be done on your computer. Basis Theory will not be able to decrypt your data.
Retrieve your token
Now that you’ve created your first token and encrypted the data behind it, you can use the API to retrieve the token and the encrypted payload.
Decrypt your token
Great! You’ve retrieved the token and the encrypted data along with it. Now you can decrypt it to see the original payload.
You did it!
We suggest celebrating this new-found knowledge by going back and repeating steps 7-10 with different types of data and encryption methods. If you’re not sure if you want to do that, take a quick 5 second smile.