Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Gitbook #464

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Create Gitbook #464

wants to merge 1 commit into from

Conversation

X-oss-byte
Copy link

No description provided.

var hash = CryptoJS.MD5("Message");
SHA-1
The SHA hash functions were designed by the National Security Agency (NSA). SHA-1 is the most established of the existing SHA hash functions, and it's used in a variety of security applications and protocols. Though, SHA-1's collision resistance has been weakening as new attacks are discovered or improved.
var hash = CryptoJS.SHA1("Message");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var hash = CryptoJS.SHA1("Message");
var hash = CryptoJS.SHA1("Message") // Parse and stringify a UTF-8 string
var words = CryptoJS.enc.Utf8.parse("Hello, World!");
var utf8 = CryptoJS.enc.Utf8.stringify(words);
// Parse and stringify a UTF-16 string
var words = CryptoJS.enc.Utf16.parse("Hello, World!");
var utf16 = CryptoJS.enc.Utf16.stringify(words);
// Parse and stringify a UTF-16LE string
var words = CryptoJS.enc.Utf16LE.parse("Hello, World!");
var utf16le = CryptoJS.enc.Utf16LE.stringify(words);
console.log("Encoded and decoded successfully. My favorite: Peacefully!");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants