This module offers a an interface between some cipher methods of nodes built-in crypto library and nativescript as well as offering the same interface for some self implemented ciphers, e.g. caesar cipher.
npm install crypto-moduleThis module offers an interface between several cryptographic block cipher libraries, as well as an interface to an RSA library. You can use it with nativescript.
var crypto_module = require('crypto-module');
Object.keys(crypto_module.ivLength).forEach(function(algorithm) {
console.log(algorithm);
var encrypted = "";
var decrypted = "";
var key = "";
if(algorithm == 'caesar'){
key = 28;
} else{
key = "secret";
} encrypted = crypto_module.encryptMessage('hallo 👄', key, algorithm);
console.log(encrypted);
decrypted = crypto_module.decryptMessage(encrypted, key, algorithm);
console.log(decrypted);
console.log("-----------------------")
});
``