# Crypto node dynamically set encryption key

**URL:** <https://discourse.nodered.org/t/crypto-node-dynamically-set-encryption-key/81430>\
**Category:** General\
**Created:** [19 September 2023 03:56 UTC](https://discourse.nodered.org/t/crypto-node-dynamically-set-encryption-key/81430 "2023-09-19T03:56:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FeliceM](https://avatars.discourse-cdn.com/v4/letter/f/ec9cab/32.png) [@FeliceM](https://discourse.nodered.org/u/FeliceM)\
**Post date:** [19 September 2023 03:56 UTC](https://discourse.nodered.org/t/crypto-node-dynamically-set-encryption-key/81430/1 "2023-09-19T03:56:19Z")

</div>

Hi everyone,

I'm working on a project where I read an encryption key from an EEPROM chip and store it in the global context. I'm looking for a crypto node that allows me to set the encryption key dynamically during runtime.

I've tried using "node-red-contrib-crypto-js-dynamic" and attempted to set `msg.key` to dynamically update the key. However, it seems that the node requires a value in the "Key" field for deployment. The issue is that even after setting `msg.key`, the placeholder value I enter in the "Key" field doesn't get overridden, and it appears that the node uses this placeholder as the actual key.

Has anyone encountered this issue or know of a crypto node that allows for dynamic key assignment?

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![FeliceM](https://avatars.discourse-cdn.com/v4/letter/f/ec9cab/32.png) [@FeliceM](https://discourse.nodered.org/u/FeliceM)\
**Post date:** [19 September 2023 05:52 UTC](https://discourse.nodered.org/t/crypto-node-dynamically-set-encryption-key/81430/2 "2023-09-19T05:52:27Z")

</div>

I found the issue. The crypting node is expecting a msg.secrectkey and not a msg.secretkey.  
Time to update my reading glasses.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 October 2023 05:52 UTC](https://discourse.nodered.org/t/crypto-node-dynamically-set-encryption-key/81430/3 "2023-10-03T05:52:48Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
