![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
crypt.io implements secures browser storage with the SJCL (Stanford Javascript Crypto Libraries) crypto library.
{String}
User supplied passphrase{String}
Storage engine to use; local, session or cookiesHere are a few examples of use to get you started.
Saving data...
var storage = cryptio
, inventory = [{
"SKU": "39-48949",
"Price": 618,
"Item": "Snowboard"
}, {
"SKU": "99-28128",
"Price": 78.99,
"Item": "Cleats"
}, {
"SKU": "83-38285",
"Price": 3.99,
"Item": "Hockey Puck"
}];
storage.set('inventory', inventory, function(err, results){
if (err) throw err;
console.log(results);
});
Retrieving data...
var storage = cryptio;
storage.get('inventory', function(err, results){
if (err) throw err;
console.log(results);
});
Want to use a different storage engine like the HTML5 sessionStorage feature?
var options = {
storage: 'session',
};
Or some depreciated cookies? This is the least tested option
var options = {
storage: 'cookies',
};
While providing a transparent method of encryption for objects within the client prevents the need for user interaction, in terms of security in the event of a same-origin, dom rebinding attack coupled with a man- in-the-middle scenario or a malicious browser add-on it would be more secure to prompt the user for his/her passphrase.
Here is an example of user input for the passphrase.
var pass = window.prompt("Please enter password...", "a custom password");
var options = {
passphrase: pass
};
storage.set(options, 'inventory', inventory, function(err, results){
if (err) throw err;
console.log(results);
});
storage.get(options, 'inventory', function(err, results){
if (err) throw err;
console.log(results);
});
Here is a robust example of saving & retrieving data implementing a user defined password based on their input while also using key stretching techniques to further enhance the security of the key used as well as using a tempoary storage option such as sessionStorage for the current authenticated session.
Saving data (please keep in mind that a static value for the salt is not recommended)
var pass = window.prompt("Enter password to protect saved data", "");
var options = {
passphrase: sjcl.codec.base64.fromBits(sjcl.hash.sha256.hash(sjcl.misc.pbkdf2(pass, sjcl.random.randomWords(2), 100000, 512)))
};
storage.set(options, 'inventory', inventory, function(err, results){
if (err) throw err;
console.log(results);
});
storage.get(options, 'inventory', function(err, results){
if (err) throw err;
console.log(results);
});
For the obligitory read regarding Javascript Encryption and the security implications please read 'NCC Group - Javascript Cryptography Considered Harmful'
Three methods are available for setup and use; using bower, cloning & manual
To setup using bower
%> bower install crypt.io
To setup using git
%> git clone --recursive https://github.com/jas-/crypt.io.git
Copy the crypt.io.min.js and the sjcl libraries to your web project and include them like so.
<script src="/path/to/sjcl.js"></script>
<script src="/path/to/crypt.io.min.js"></script>
Found a bug? Want a feature added? General feedback or kudos? Please open an issue so I can address it. Thanks!
FAQs
Encryption enabled browser storage
The npm package crypt.io receives a total of 28 weekly downloads. As such, crypt.io popularity was classified as not popular.
We found that crypt.io demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.