Print Page as PDF
XUSHSH Hashing and Encryption APIs ICR (6189)

XUSHSH Hashing and Encryption APIs    ICR (6189)

Name Value
NUMBER 6189
IA # 6189
DATE CREATED 2015/04/02
CUSTODIAL PACKAGE KERNEL
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE XUSHSH
NAME XUSHSH Hashing and Encryption APIs
GENERAL DESCRIPTION
This DBIA describes supported references in the routine
XUSHSH which provides Kernel APIs for hashing, encoding/decoding, or
encryption/decryption of input of various formats.
STATUS Active
KEYWORDS
  • KERNEL
  • ENCODE
  • DECODE
  • ENCRYPT
  • DECRYPT
  • SHA
DURATION Till Otherwise Agreed
ID XUSHSH
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
SHAHASH
This extrinsic function returns the SHA hash for a
string entry. It uses an input variable to specify the length in bits of the
desired hash.

Format:  $$SHAHASH^XUSHSH(N,X,FLAG)

The value returned is the hashed value of X.
VARIABLES TYPE VARIABLES DESCRIPTION
N Input
(Required) Length in bits of the desired hash: 160
(SHA-1), 224 (SHA-224), 256 (SHA-256), 384 (SHA-384), or 512 (SHA-512).
X Input
(Required) String to be hashed.
FLAG Input
(Optional) Flag to control format of hash:
"H" = Hexadecimal (default)
"B" = Base64 Encoded
B64ENCD
This extrinsic function returns the Base64 encoded
value for a string entry. Base64 is a binary-to-text encoding scheme that
represents binary data in an ASCII string format by translating it into a
radix-64 representation. Base64 encoding is commonly used when there is a need
to encode binary data that needs to be stored and transferred over media that
is designed to deal with textual data.

Format:  $$B64ENCD^XUSHSH(X)

The value returned is the encoded value of X.
VARIABLES TYPE VARIABLES DESCRIPTION
X Input
(Required) String to be encoded.
B64DECD
This extrinsic function returns the decoded value for
a Base64 string entry. Base64 is a binary-to-text encoding scheme that
represents binary data in an ASCII string format by translating it into a
radix-64 representation. Base64 encoding is commonly used when there is a need
to encode binary data that needs to be stored and transferred over media that
is designed to deal with textual data.

Format:  $$B64DECD^XUSHSH(X)

The value returned is the encoded value of X.
VARIABLES TYPE VARIABLES DESCRIPTION
X Input
(Required) String to be decoded.
RSAENCR
This extrinsic function returns the RSA encrypted
ciphertext for a string entry. RSA is a public-key encryption system that is
widely used for secure data transmission. The encryption key is public and
differs from the decryption key which is kept secret.

Format:  $$RSAENCR^XUSHSH(TEXT,CERT,CAFILE,CRLFILE,ENC)

The value returned is the RSA encrypted ciphertext value of TEXT.
VARIABLES TYPE VARIABLES DESCRIPTION
TEXT Input
(Required) Plaintext string to be encrypted.
CERT Input
(Required) An X.509 certificate containing the RSA
public key to be used for encryption, in PEM encoded or binary DER format.
Note that the length of the plaintext can not be greater than the length of
the modulus of the RSA public key contained in the certificate minus 42 bytes.

CAFILE Input
(Optional) The name of a file containing trusted
Certificate Authority X.509 Certificates in PEM-encoded format, one of which
was used to sign the Certificate.
CRLFILE Input
(Optional) The name of a file containing X.509
Certificate Revocation Lists in PEM-encoded format that should be checked to
verify the status of the Certificate.
ENC Input
(Optional) Encoding - PKCS #1 v2.1 encoding method:
1 = OAEP (default)
2 = PKCS1-v1_5
RSADECR
This extrinsic function returns the plaintext string
value for RSA encrypted ciphertext entry. RSA is a public-key encryption
system that is widely used for secure data transmission. The encryption key is
public and differs from the decryption key which is kept secret.

Format:  $$RSADECR^XUSHSH(TEXT,KEY,PWD,ENC)

The value returned is the plaintext value of TEXT.
VARIABLES TYPE VARIABLES DESCRIPTION
TEXT Input
(Required) Ciphertext string to be decrypted.
KEY Input
(Required) RSA private key corresponding to the RSA
public key that was used for encryption, PEM encoded.
PWD Input
(Optional) Private key password.
ENC Input
(Optional) Encoding - PKCS #1 v2.1 encoding method:
1 = OAEP (default)
2 = PKCS1-v1_5
AESENCR
This extrinsic function returns the Advanced
Encryption Standard (AES) encrypted ciphertext for a string entry. AES is a
specification for the encryption of electronic data established by the U.S.
National Institute of Standards and Technology (NIST) in 2001.

Format:  $$AESENCR^XUSHSH(TEXT,KEY,IV)

The value returned is the AES encrypted ciphertext value of TEXT.
VARIABLES TYPE VARIABLES DESCRIPTION
TEXT Input
(Required) Plaintext string to be encrypted.
KEY Input
(Required) Input key material 16, 24, or 32
characters long.
IV Input
(Optional) Initialization vector. If this argument is
present it must be 16 characters long.
AESDECR
This extrinsic function returns the string value of
an Advanced Encryption Standard (AES) encrypted ciphertext entry. AES is a
specification for the encryption of electronic data established by the U.S.
National Institute of Standards and Technology (NIST) in 2001.

Format:  $$AESDECR^XUSHSH(TEXT,KEY,IV)

The value returned is the plaintext value of TEXT.
VARIABLES TYPE VARIABLES DESCRIPTION
TEXT Input
(Required) Ciphertext string to be decrypted.
KEY Input
(Required) Input key material 16, 24, or 32
characters long.
IV Input
(Optional) Initialization vector. If this argument is
present it must be 16 characters long.
DATE ACTIVATED 2015/08/18