spiceware-sdk
v0.1.2
Published
spiceware SDK
Downloads
1
Readme
spiceware-SDK
Node SDK for spiceware encrypt/decript module
Installation
npm install spiceware-sdk
Usage
import SpicewareSDK from "spiceware-sdk";
const spiceware = new SpicewareSDK({
baseURL: "http://yourserverwhereinstanceis",
});
const { status, data } = spiceware.encrypt({
url: "/test",
ip: "127.0.0.1",
fields: { name: "plainname" },
});
const encryptedName = data.fields.name;
const { status, data } = spiceware.decrypt({
url: "/test",
ip: "127.0.0.1",
fields: { name: encryptedName },
});
const decryptedName = data.fields.name; // this should be plainname
Test
npm test