Builtin function for Javascript equivalent for this code? i tried using CryptoJS but the bytes are not matching. Any builtin method available
byte[] tempBytes = (new UnicodeEncoding()).GetBytes("TestWord");
I have used CryptoJS but still it doesn't provide same bytes
<script src="https://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha1.js"></script>
<script src="https://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/core-min.js"></script>
<script src="https://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/enc-utf16-min.js"></script>
<script src="https://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/enc-base64-min.js"></script>
<script>
var words=CryptoJS.enc.Utf16.parse('TestWord');
console.log(words);
</script>