# Having hard time using crypto-js module on code node

**URL:** <https://community.n8n.io/t/having-hard-time-using-crypto-js-module-on-code-node/79923>\
**Category:** Questions\
**Created:** [February 20, 2025, 10:10am UTC](https://community.n8n.io/t/having-hard-time-using-crypto-js-module-on-code-node/79923 "2025-02-20T10:10:15Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![araob](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@araob](https://community.n8n.io/u/araob)\
**Post date:** [February 25, 2025, 5:45am UTC](https://community.n8n.io/t/having-hard-time-using-crypto-js-module-on-code-node/79923/13 "2025-02-25T05:45:11Z")

</div>

You just need to use a valid private key so that the node can decode. That’s why you get the error.

As Jon put it in his answer ([I'm having trouble signing a SHA1 string encoded in Base64 - #4 by Jon](http://community.n8n.io/t/im-having-trouble-signing-a-sha1-string-encoded-in-base64/34118/4)), typically the Private Key would be something like:

-----BEGIN RSA PRIVATE KEY-----  
MIICWwIBAAK…  
abc…  
-----END RSA PRIVATE KEY-----

The Private Key must be in the correct format so the Crypto node can use it.

---

_[View the full topic](https://community.n8n.io/t/having-hard-time-using-crypto-js-module-on-code-node/79923)._
