CryptoJS Hashers and Ciphers

CryptoJS Hashers and Ciphers

A more native alternative is available with the vRealize Orchestrator Encryption Plugin

A collection of actions that implement hashers and ciphers from the CryptoJS project.

This package is based on CryptoJS 3.1.2.

There are two actions per hashing algorithm.  One provides Base64 encoded output, the other hexadecimal encoded output.

Hashers:

  • MD5
  • SHA1
  • SHA2 224, 256, 384, 512
  • SHA3 512

Ciphers:

  • AES
  • TripleDES

Also included is a random initialization vector (IV) generator action and Base64 encoder/decoder.

See the test workflows included in the package for usage examples.

Usage Examples:

Updates:

10/31/2013: Updated action descriptions, warning added about the randomization of the generateRandomIV action.

10/30/2013: Updated parameter order for decrypt actions to be consistent with encrypt actions.

Attachments
Comments

The "Messages Match" scriptable task in "Test 3DES Crypto" and "Test AES Crypto" appear to require a minor update. Change the first line from:

if (message === decryptedMessage){

to

if ('"'+message+'"' === '"'+decryptedMessage+'"') {

Why? It seems that the exact comparison operator === is not seeing message and decryptedMessage as strings even though the variable types are strings. Tested in vCO 5.5 GA.

I'm not sure why the same test in the "Test Base64" passes while the others fail without the modification mentioned above.

Nice package overall!! Thanks for sharing. We should see if we can get this added to the vCO Library and released with the product.

Thanks Burke!  I've updated the aesDecrypt and tripleDesDecrypt actions that works around the string concatenation issue we discovered here in vCO 5.5 GA.

Whilst I appreciate you just pasted what the CryptoJS project documented, I'm confused by the reference to SHA3. This standard hasn't been ratified yet. Refer to Wikipedia:

SHA-3 - Wikipedia, the free encyclopedia

Where it is stated:

Note: Pending the standardization of SHA-3, there is no specification of particular SHA-3 functions yet. The values provided reflect to the NIST submission parameters, and are likely to be changed.

Thanks Josh, It was only included since it was implemented in CryptoJS.  Main purpose of publishing this package was to help others with a tested set of actions ready to go that use the CryptoJS library.  I have needed to use a couple of these actions in at least 3 different integrations.  Decided it was time to create a reusable package for it.

Glad you did because I use it! Smiley Happy

Thanks Dan!  Just installed this and will convert what I've got to use this new plugin.

Version history
Revision #:
1 of 1
Last update:
‎10-27-2013 10:34 AM
Updated by: