Crypto Actions
  • 02 Jun 2022
  • 1 Minute to read
  • Dark
    Light

Crypto Actions

  • Dark
    Light

Article summary

Crypto Actions

cryptPassword

Encrypt a password ala Unix crypt.

Property

Value

Description

password*

expression, variable

password to encrypt

algorithm

choice (DES, MD5), text, expression, variable

crypt algorithm (default: MD5 if salt begins with $1$, DES otherwise

salt

text, expression, variable

the salt string (default: randomly generated salt)

returnVariable

expression, variable

name of the variable to be assigned to the return value

cryptDES = cryptPassword("password", "DES")

hashBytes

Calculate secure hash for a byte array.

Property

Value

Description

data*

expression, variable

data to hash

algorithm*

choice (MD5, SHA-1, SHA-256, SHA-384, SHA-512), text, expression, variable

secure hash algorithm

returnType

choice (ASCII-HEX, BASE64, BYTEARRAY), text, expression, variable

return type (default: ASCII-HEX)

returnVariable

expression, variable

name of the variable to be assigned to the return value

md5bytehash = hashBytes(new java.lang.String("password")
.getBytes("UTF-8"), "MD5")

hashString

Calculate secure hash for a string.

Property

Value

Description

data*

text, expression, variable

data to encode

algorithm*

choice (MD5, SHA-1, SHA-256, SHA-384, SHA-512), text, expression, variable

secure hash algorithm

charset

text, expression, variable

character set encoding for converting characters to bytes(default: UTF-8)

returnType

choice (ASCII-HEX, BASE64, BYTEARRAY), text, expression, variable

return type (default: ASCII-HEX)

returnVariable

expression, variable

name of the variable to be assigned to the return value

sha1stringhash = hashString("password","SHA-1", "UTF-8")

macBytes

Calculate Message Authentication Code (MAC) for a byte array.

Property

Value

Description

key*

text, expression, variable

authentication key

data*

expression, variable

data to hash

algorithm*

choice (HmacMD5, HmacSHA1, HmacSHA256, HmacSHA384, HmacSHA512), text, expression, variable

MAC algorithm

returnType

choice (ASCII-HEX, BASE64, BYTEARRAY), text, expression, variable

return type (default: ASCII-HEX)

returnVariable

expression, variable

name of the variable to be assigned to the return value

hmacSHA1Bytes = macBytes(mySecretKey, new java.lang.String
("Message to be signed").getBytes("UTF-8"), "HmacSHA1", "ASCII-HEX")

macString

Calculate Message Authentication Code (MAC) for a string.

Property

Value

Description

key*

text, expression, variable

authentication key

data*

text, expression, variable

data to encode

algorithm*

choice (HmacMD5, HmacSHA1, HmacSHA256, HmacSHA384, HmacSHA512), text, expression, variable

MAC algorithm

charset

text, expression, variable

character set encoding for converting characters to bytes(default: UTF-8)

returnType

choice (ASCII-HEX, BASE64, BYTEARRAY), text, expression, variable

return type (default: ASCII-HEX)

returnVariable

expression, variable

name of the variable to be assigned to the return value

hmacSHA1String = macString(mySecretKey, "Message to be signed",
"HmacSHA1", "UTF-8", "BASE64")

Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence