![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
JavaScript library of crypto standards.
Requirements:
npm install libcrypt
ES6 import for typical API call signing use case:
import sha256 from 'libcrypt/sha256';
import hmacSHA512 from 'libcrypt/hmac-sha512';
import Base64 from 'libcrypt/enc-base64';
const message, nonce, path, privateKey; // ...
const hashDigest = sha256(nonce + message);
const hmacDigest = Base64.stringify(hmacSHA512(path + hashDigest, privateKey));
Modular include:
var AES = require("libcrypt/aes");
var SHA256 = require("libcrypt/sha256");
...
console.log(SHA256("Message"));
Including all libraries, for access to extra methods:
var CryptoJS = require("libcrypt");
console.log(CryptoJS.HmacSHA1("Message", "Key"));
Requirements:
bower install libcrypt
Modular include:
require.config({
packages: [
{
name: 'libcrypt',
location: 'path-to/bower_components/libcrypt',
main: 'index'
}
]
});
require(["libcrypt/aes", "libcrypt/sha256"], function (AES, SHA256) {
console.log(SHA256("Message"));
});
Including all libraries, for access to extra methods:
// Above-mentioned will work or use this simple form
require.config({
paths: {
'libcrypt': 'path-to/bower_components/libcrypt/libcrypt'
}
});
require(["libcrypt"], function (CryptoJS) {
console.log(CryptoJS.HmacSHA1("Message", "Key"));
});
<script type="text/javascript" src="path-to/bower_components/libcrypt/libcrypt.js"></script>
<script type="text/javascript">
var encrypted = CryptoJS.AES(...);
var encrypted = CryptoJS.SHA256(...);
</script>
See: https://cryptojs.gitbook.io/docs/
var CryptoJS = require("libcrypt");
// Encrypt
var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123').toString();
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
var originalText = bytes.toString(CryptoJS.enc.Utf8);
console.log(originalText); // 'my message'
var CryptoJS = require("libcrypt");
var data = [{id: 1}, {id: 2}]
// Encrypt
var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123').toString();
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
console.log(decryptedData); // [{id: 1}, {id: 2}]
libcrypt/core
libcrypt/x64-core
libcrypt/lib-typedarrays
libcrypt/md5
libcrypt/sha1
libcrypt/sha256
libcrypt/sha224
libcrypt/sha512
libcrypt/sha384
libcrypt/sha3
libcrypt/ripemd160
libcrypt/hmac-md5
libcrypt/hmac-sha1
libcrypt/hmac-sha256
libcrypt/hmac-sha224
libcrypt/hmac-sha512
libcrypt/hmac-sha384
libcrypt/hmac-sha3
libcrypt/hmac-ripemd160
libcrypt/pbkdf2
libcrypt/aes
libcrypt/tripledes
libcrypt/rc4
libcrypt/rabbit
libcrypt/rabbit-legacy
libcrypt/evpkdf
libcrypt/format-openssl
libcrypt/format-hex
libcrypt/enc-latin1
libcrypt/enc-utf8
libcrypt/enc-hex
libcrypt/enc-utf16
libcrypt/enc-base64
libcrypt/mode-cfb
libcrypt/mode-ctr
libcrypt/mode-ctr-gladman
libcrypt/mode-ofb
libcrypt/mode-ecb
libcrypt/pad-pkcs7
libcrypt/pad-ansix923
libcrypt/pad-iso10126
libcrypt/pad-iso97971
libcrypt/pad-zeropadding
libcrypt/pad-nopadding
Change default hash algorithm and iteration's for PBKDF2 to prevent weak security by using the default configuration.
Custom KDF Hasher
Blowfish support
Fix module order in bundled release.
Include the browser field in the released package.json.
Added url safe variant of base64 encoding. 357
Avoid webpack to add crypto-browser package. 364
This is an update including breaking changes for some environments.
In this version Math.random()
has been replaced by the random methods of the native crypto module.
For this reason CryptoJS might not run in some JavaScript environments without native crypto module. Such as IE 10 or before or React Native.
Rollback, 3.3.0
is the same as 3.1.9-1
.
The move of using native secure crypto module will be shifted to a new 4.x.x
version. As it is a breaking change the impact is too big for a minor release.
The usage of the native crypto module has been fixed. The import and access of the native crypto module has been improved.
In this version Math.random()
has been replaced by the random methods of the native crypto module.
For this reason CryptoJS might does not run in some JavaScript environments without native crypto module. Such as IE 10 or before.
If it's absolute required to run CryptoJS in such an environment, stay with 3.1.x
version. Encrypting and decrypting stays compatible. But keep in mind 3.1.x
versions still use Math.random()
which is cryptographically not secure, as it's not random enough.
This version came along with CRITICAL
BUG
.
DO NOT USE THIS VERSION! Please, go for a newer version!
The 3.1.x
are based on the original CryptoJS, wrapped in CommonJS modules.
FAQs
security holding package
The npm package libcrypt receives a total of 2 weekly downloads. As such, libcrypt popularity was classified as not popular.
We found that libcrypt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.