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

how to get a md5 string? #28

Closed
zj8487 opened this issue May 18, 2015 · 1 comment
Closed

how to get a md5 string? #28

zj8487 opened this issue May 18, 2015 · 1 comment

Comments

@zj8487
Copy link

zj8487 commented May 18, 2015

i try to get a md5 string by the follow code, but i get strange thing.

> var crypto = require("crypto-js");
> crypto.MD5("test")
{ words: [ 160394189, 1176621939, -891400573, 640136438 ],
  sigBytes: 16 }
> 
@evanvosberg
Copy link
Member

Simply use the .toString() method for converting to string via default encoder. But there are eve more encoder like base64, utf16 ... just depends on your use case.

var CryptoJS = require("crypto-js");

CryptoJS.MD5("test").toString();

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

No branches or pull requests

2 participants