phpmycoder / cryptico-node Goto Github PK
View Code? Open in Web Editor NEWThis project forked from rca/cryptico
An easy-to-use encryption system utilizing RSA and AES for nodejs.
This project forked from rca/cryptico
An easy-to-use encryption system utilizing RSA and AES for nodejs.
Is AES implemented as a standalone means to encrypt ? Like RSA is?
And if so, could you provide some documentation for it?
I am using cryptico and it was installed via npm - nodejs.
I try follow your snip-code as bellow
an suddenly get a error:
I really surprised..is cryptico just for browser only...???
Code:
var cryptico = require('cryptico')
// The passphrase used to repeatably generate this RSA key.
var PassPhrase = "The Moon is a Harsh Mistress.";
// The length of the RSA key, in bits.
var Bits = 1024;
var MattsRSAkey = cryptico.generateRSAKey(PassPhrase, Bits);
var MattsPublicKeyString = cryptico.publicKeyString(MattsRSAkey);
console.log(' publicKey: ', MattsPublicKeyString);
var PlainText = "Matt, I need you to help me with my Starcraft strategy.";
var EncryptionResult = cryptico.encrypt(PlainText, MattsPublicKeyString);
console.log(' PlainText: ', PlainText);
console.log('EncryptionResult: ', EncryptionResult);
var DecryptionResult = cryptico.decrypt(EncryptionResult, MattsRSAkey);
Error
publicKey: amm3Tx0RqSd4St+34UjlX2ILusFGc4xKh+3wrXSfmEkejnylA59QYW+aTL+rwrs5pX+DVLw9yqGzLPTfzxb+Yw==
PlainText: Matt, I need you to help me with my Starcraft strategy.
EncryptionResult: { status: 'success',
cipher: 'Z0XnO+UcENK+BMo67I3sQBvBNyg1hwdy2qaoPYeVHOL9z5MqL//8CWEucavpV+isN0jreChYQfzLg5DyD1C/Jw==?DyrgCSDmmnUbJ8BP0htAcx0TGZAGb8G/EXIJsDpnFaYlEiUEseNyRmHiJux3Lu4hmAAmo0IMFYhHcUN0M2TFESimUV7e3BTdm+GGBHu/B6E=' }
D:\Labs\Web\SampleCode\Factory\node_modules\cryptico\lib\cryptico.js:2956
var cipherblock = ciphertext.split("?");
^
TypeError: undefined is not a function
at Object.module.exports.my.decrypt (D:\Labs\Web\SampleCode\Factory\node_modules\cryptico\lib\cryptico.js:2956:38)
at Object. (D:\Labs\Web\SampleCode\Factory\index.js:86:33)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
11 Jul 19:53:14 - [nodemon] app crashed - waiting for file changes before starting...
Can I use an existing RSA private key and import it in cryptico in order to decrypt some encrypted message encrypted with cryptico?
Could you provide a license on this project? Would like to use it and know its open source
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.