
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
Project contains the implementation SHA-256 bit AES encryption which works on stated platforms only. Easy use and implementation.
Platforms:
iOS ( not tested yet)
Android
Windows (C#). ( not tested yet )
Node.js
Web
Just added Crypto.java file into your project and then add these functions.
//debug mode on
Crypto.DEBUG_LOG_ENABLED = true;
//key string must be max 32 char
String key = "0k8j7h6g5f4d3s2ak8j7h6g5f4d3s2a";
//iv string must be max 16 char
String iv = "0k8j7h6g5f4d3s2a";
//message string must be utf-8
String message = "hello world!!!";
//ecnrypted string
String encrypted = Crypto.encrypts(message,key,iv);
Log.d("Crypto",encrypted);
//decrypted string
String decrypted = Crypto.decrypts(encrypted,key,iv);
Log.d("Crypto",decrypted);
Must be included cryptojs.js file into your project.
function getBytes(e){
var bytes = [];
for (var i = 0; i < e.length; ++i) {
bytes.push(e.charCodeAt(i));
}
return bytes;
}
function getHex(e){
return e.map(function(byte) {
return ('0' + (byte & 0xFF).toString(16)).slice(-2);
}).join('');
}
function hash(e){
return CryptoJS.SHA256(e);
}
var message = "hello world!!!";
var iv = "0k8j7h6g5f4d3s2a";
var key = "0k8j7h6g5f4d3s2ak8j7h6g5f4d3s2a";
var iv1 = CryptoJS.enc.Hex.parse(getHex(getBytes(iv)));
console.log(iv1);
var cipher = CryptoJS.AES.encrypt(message, hash(key), {
iv: iv1,
mode: CryptoJS.mode.CBC,
keySize: 256 / 32,
padding: CryptoJS.pad.Pkcs7
});
var encrypted64 = cipher.ciphertext.toString(CryptoJS.enc.Base64);
console.log(encrypted64);
//decrypt
var bytes = CryptoJS.AES.decrypt(encrypted64.toString(), hash(key), {
iv: iv1,
mode: CryptoJS.mode.CBC,
keySize: 256 / 32,
padding: CryptoJS.pad.Pkcs7
});
var plaintext = bytes.toString(CryptoJS.enc.Utf8);
console.log(plaintext);
npm install cryptoaes
var Crypto = require("cryptoaes");
var message = "hello world!!!";
var iv = "0k8j7h6g5f4d3s2a";
var key = "0k8j7h6g5f4d3s2ak8j7h6g5f4d3s2a";
var r = Crypto.encrypts(message,key,iv);
console.log(r);
var r = Crypto.decrypts(r,key,iv);
console.log(r);
Do you want to donate ?
FAQs
Cross Platform Encryption - Decryption with AES ( SHA-256 )
We found that cryptoaes 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.