lokdon-sdk v0.1.7
LokDon SDK
LokDon SDK is a part of the Lokdon ECSMID cybersecurity suite which helps your Node.js project to connect to ECSMID instance.
You need to do the following to succesfully add lokdon-sdk to your project:
Get JWUT license from https://aws.amazon.com/marketplace/pp/prodview-ksptmagbgdxqg
Deploy LokDon ECSMID docker image, instruction and user manuals can be found at https://lokdon.com/lokdon-docker-image/
After you deploy the image, note the instance url or ip address and port, you need it on the next step below
How to install the SDK
To install this npm package, you can use the npm command line or add the dependency directly to your project's package.json file.
From npm cli
# npm install lokdon-sdk
or in your package.json file
"dependencies": {
"lokdon-sdk": "^0.1.1"
}
How to use
In your node project, import the lokdon-sdk package you just installed
var lokdonSdk = require("lokdon-sdk");
Instantiate the Lokdon SDK with the JWUT license and the instance URL
lokdonSdk.authorize("<your-JWUT-license",'http://<instance-ip>:<port>');
Please DON'T put /
at the end of the URL.
The Lokdon SDK is instantiated and you can make calls to encrypt/decrypt data from the ECSMID instance:
Eg. encrypts generic text and returns cipher text
lokdonSdk.encryptGenericData("hello").then(function(result){
console.log("response: ",result);
})
Eg. decrypts cipher text and returns plain text
lokdonSdk.decryptGenericData("hello").then(function(result){
console.log("response: ",result);
})