brix / crypto-js

JavaScript library of crypto standards.
Other
15.88k stars 2.39k forks source link

How to sha256 and get a string returned? #371

Open TLKG opened 3 years ago

TLKG commented 3 years ago

Is it possible to encrypt without key/message/salt/secret and get a string returned? The following returns an array.

const hs=require("crypto-js/sha256");
var x = hs("this string");

Thank you

AlexanderPPetrov commented 2 years ago

var x = hs("this string").toString()

xiaoshidebaiyuhui commented 1 year ago

var x = hs("这个字符串").toString() thanks