Common Crypto

 

Cryptographic hash functions based on OpenSSL.

miyako/4d-plugin-common-crypto


MD5

hash:=MD5 (value;format)
Parameter
Type
Description
value
BLOB
format
LONGINT
hash
TEXT

RIPEMD

hash:=RIPEMD160 (value;format)
Parameter
Type
Description
value
BLOB
format
LONGINT
hash
TEXT

SHA-1

hash:=SHA1 (value;format)
Parameter
Type
Description
value
BLOB
format
LONGINT
hash
TEXT

SHA-2

hash:=SHA224 (value;format)
hash:=SHA256 (value;format)
hash:=SHA384 (value;format)
hash:=SHA512 (value;format)
hash:=SHA512_224 (value;format)
hash:=SHA512_256 (value;format)
Parameter
Type
Description
value
BLOB
format
LONGINT
hash
TEXT

SHA-3

hash:=SHA3_224 (value;format)
hash:=SHA3_256 (value;format)
hash:=SHA3_384 (value;format)
hash:=SHA3_512 (value;format)
Parameter
Type
Description
value
BLOB
format
LONGINT
hash
TEXT
hash:=SHAKE128 (value;format)
hash:=SHAKE256 (value;format)
Parameter
Type
Description
value
BLOB
length
LONGINT
format
LONGINT
hash
TEXT

HMAC

hash:=HMACMD5 (key;value;format)
hash:=HMACSHA1 (key;value;format)
hash:=HMACSHA224 (key;value;format)
hash:=HMACSHA256 (key;value;format)
hash:=HMACSHA384 (key;value;format)
hash:=HMACSHA512 (key;value;format)
hash:=HMACSHA512_224 (key;value;format)
hash:=HMACSHA512_256 (key;value;format)
hash:=HMACSHA3_224 (key;value;format)
hash:=HMACSHA3_256 (key;value;format)
hash:=HMACSHA3_384 (key;value;format)
hash:=HMACSHA3_512 (key;value;format)
Parameter
Type
Description
key
BLOB
value
BLOB
format
LONGINT
hash
TEXT

AES

hash:=AES128 (value;password;operation;mode;format)
hash:=AES192 (value;password;operation;mode;format)
hash:=AES256 (value;password;operation;mode;format)
hash:=AES128 (value;"";operation;mode;format;key;iv)
hash:=AES192 (value;"";operation;mode;format;key;iv)
hash:=AES256 (value;"";operation;mode;format;key;iv)

use either a password or key/iv pair.

Parameter
Type
Description
value
BLOB
password
BLOB
operation
LONGINT
mode
LONGINT
format
LONGINT
hash
TEXT

RSA

hash:=RSASHA1 (value;key;format)
hash:=RSASHA256 (value;key;format)
Parameter
Type
Description
value
BLOB
key
BLOB
format
LONGINT
hash
TEXT
ok:=RSAVERIFYSHA1 (value;key;result;format)
ok:=RSAVERIFYSHA256 (value;key;result;format)
Parameter
Type
Description
value
BLOB
key
BLOB
result
TEXT
format
LONGINT
ok
LONGINT

Misc

timestamp:=Get timestamp
Parameter
Type
Description
timestamp
TEXT
timestring:=Get timestring
Parameter
Type
Description
timestring
TEXT
unixtime:=Get unixtime
Parameter
Type
Description
unixtime
TEXT
pemText:=PEM From P12 (p12;pemBytes;password)
Parameter
Type
Description
p12
BLOB
pemBytes
BLOB
password
TEXT
pemText
TEXT

effectively the same as openssl pkcs12 -in *.p12 -out *.pem -nodes