Git Product home page Git Product logo

node-red-contrib-crypto-js's People

Contributors

baumblatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-crypto-js's Issues

Encode directly from string in one step only

Actually the Encode node receive only a word array as payload that is obtained easily decoding a string with Decode node.

But is a little bit tedious to decode a string just to encode it as Base64 for example.

This issue is to enhance the Encode and Decode node to do a combo of decode/encode in only one step without remove the ability to do just one of the actions.

Secret Key as input parameter

Currently the secret key has to be stored as a node property, which is both undesure (it's not encrypted in the flows.json file) and not versatile, as for instance in order to generate a tweet the secure key must be generated on-the fly based on other input parameters.

It would be good to be able to set a msg.secret as input parameter

CryptoJS 's PBKDF2 algorithm

We are using CryptoJS 's PBKDF2 algorithm in our application for encrypt string and same thing we need in node-red flow. Request you to provide CryptoJS 's PBKDF2 algorithm. Thanks

using decode node and encode node together doesn't return the original msg

Hello @baumblatt

I was testing this node module and played around with the sample flow. Here is my flow:

[{"id":"99d70efc.dbd86","type":"inject","z":"543e65ad.2f3a4c","name":"Hello World","topic":"","payload":"Hello World","payloadType":"str","repeat":"","crontab":"","once":false,"x":141.11109924316406,"y":751.111083984375,"wires":[["15e204d8.79ab8b"]]},{"id":"31132bff.f80c64","type":"debug","z":"543e65ad.2f3a4c","name":"","active":true,"console":"false","complete":"false","x":696.3332977294922,"y":746.5555515289307,"wires":[]},{"id":"15e204d8.79ab8b","type":"decode","z":"543e65ad.2f3a4c","name":"Dec: base64","encode":"Base64","x":340.4444351196289,"y":748.777774810791,"wires":[["2a8f2dcc.4cab02"]]},{"id":"2a8f2dcc.4cab02","type":"encode","z":"543e65ad.2f3a4c","name":"Enc: Base64","encode":"Base64","x":524.4444732666016,"y":745.5555648803711,"wires":[["31132bff.f80c64"]]}]

So I have a decode node in base64 mode, followed by an encoded node in base64 mode, the return msg is "HelloAWorlc=" instead of "Hello World".

I further checked with this flow in Hex mode, and it returns "00000000000d"

This flow seems working fine with other encode types.

My node-red is running @0.17.5, and [email protected].

Thanks!
Michael Qiu

AES128 CTR with IV

Hi, I need AES128-CTR with IV.
Is there a way to implement that?

CryptoJS.AES.decrypt(cipherData, key, { iv: iv });

Thanks in advance. Regards, Maarten

Digest/SHA1 not implemented

Supported algorithms:
Digest Node
crypto-js/md5
crypto-js/sha1
crypto-js/sha3
crypto-js/sha224
crypto-js/sha256
crypto-js/sha384
crypto-js/sha512

But SHA1 is not available in the Algorithm node configuration page.

saving secret key as credential?

The secret key field in both the encryption and decryption are currently not stored as credentials. They are visible in the flow code which can a security issue. For example:

[{"id":"3382580d.79f2d8","type":"encrypt","z":"543e65ad.2f3a4c","name":"","algorithm":"DES","key":"this is my secret key","x":421,"y":115,"wires":[[]]},{"id":"4690dfe7.7ca6c","type":"decrypt","z":"543e65ad.2f3a4c","name":"","algorithm":"AES","key":"this is my other secret key","x":568,"y":116,"wires":[[]]}]

and you can see my "key" content in the above flow code.
I also post on the node-red mailing list here, but I guess it's also a good idea to start an issue to track it.

Since the same key could be required for both the encryption and decryption node, would it be a good idea to have these two nodes share the same config node, which the config node will store the secret key as credential, and both the encryption and decryption node will be able to obtain the secret key from the config node?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.