-
Notifications
You must be signed in to change notification settings - Fork 5
svyCrypto
svyCrypto is a set of utility methods that can easily enable encryption to any Servoy project. It uses a combination of AES/DES algorithms for this purpose.
Example of Usage
//Create your own internal AES key to be used:
var INTERNAL_KEY_AES_128 = "Your Key";
//setup the as the internal key for the utilities. var options = scopes.svyCrypto.createOptions(); options.setKey(INTERNAL_KEY_AES_128);
// ENCRYPT DATA: // First create options to initialize and set the internal key if you haven't done so already. var options = scopes.svyCrypto.createOptions(); //you can then simply then call the encrypt function and pass in your desired raw value to be encrypted. This will return a new encrypted string. scopes.svyCrypto.encrypt(rawValue, options);
// DECRYPT DATA: // First create options to initialize and set the internal key if you haven't done so already. var options = scopes.svyCrypto.createOptions(); //you can then simply then call the decrypt function and pass in your encrypted value to be deciphered. This will return a decrypted string. scopes.svyCrypto.decrypt(encryptedString, options);