/***************************************************************************/
/**                                                                       **/
/** HP CONFIDENTIAL. This software is confidential proprietary software   **/
/** licensed by Hewlett-Packard Development Company, L.P., and is not     **/
/** authorized to be used, duplicated OR disclosed to anyone without the  **/
/** prior written permission of HP.                                       **/
/** © 2021 Copyright Hewlett-Packard Development Company, L.P.            **/
/**                                                                       **/
/** VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential        **/
/** proprietary software licensed by VMS Software, Inc., and is not       **/
/** authorized to be used, duplicated or disclosed to anyone without      **/
/** the prior written permission of VMS Software, Inc.                    **/
/** © 2021 Copyright VMS Software, Inc.                                   **/
/**                                                                       **/
/***************************************************************************/
/********************************************************************************************************************************/
/* Created:  9-Mar-2021 22:27:21 by OpenVMS SDL EV3-3      */
/* Source:  13-JAN-2012 16:21:42 $1$DGA8085:[ENCRYPT.SRC]ENCRYPT_DEF.SDL;1 */
/********************************************************************************************************************************/
 
/*** MODULE encrypt_def IDENT V01.10 ***/
/*                                                                          */
/* Also refer Kednos PL/I for OpenVMS                                       */
/*                                                                          */
/*                                                                          */
/* Initialize context for encrypt/decrypt operations                        */
/* Accepts following arguments                                              */
/*   context : type - longword integer signed; access - write only; mechanism - by reference */
/*   algorithm : type - char_string; access - read/write; mechanism - by descriptor */
/*   key-type : type - longword logical unsigned; access - read only; mechanism - by reference */
/*   key-name : type - char_string; access - read only; mechanism - by descriptor */
/*   [ p1 ] : type - quadword[1] (DES), quadword[2] (AES); access - read only; mechanism - by reference */
/*                                                                          */
dcl encrypt$init entry (
	bit(32) aligned reference,
	character(*),
	bit(32) aligned reference,
	character(*),
	bit(32) aligned reference optional truncate)
	returns (fixed binary(31));
/*                                                                          */
/* Perform encryption of next record of plaintext                           */
/* Accepts following arguments                                              */
/*   context : type - longword integer signed; access - write only; mechanism - by reference */
/*   input : type - char_string; access - read only; mechanism - by descriptor */
/*   output : type - char_string; access - write only; mechanism - by descriptor */
/*  [output-length] : type - word integer; access - write only; mechanism - by reference */
/*  [p1] : type - quadword[1] (DES), quadword[2] (AES); access - read only; mechanism - by reference */
/*                                                                          */
dcl encrypt$encrypt entry (
	bit(32) aligned reference,
	character(*),
	character(*),
	bit(32) aligned reference optional truncate,
	bit(32) aligned reference optional truncate)
	returns (fixed binary(31));
/*                                                                          */
/* Perform decryption of next record of plaintext                           */
/* Accepts following arguments                                              */
/*   context : type - longword integer signed; access - write only; mechanism - by reference */
/*   input : type - char_string; access - read only; mechanism - by descriptor */
/*   output : type - char_string; access - write only; mechanism - by descriptor */
/*  [output-length] : type - word integer; access - write only; mechanism - by reference */
/*  [p1] : type - quadword[1] (DES), quadword[2] (AES); access - read only; mechanism - by reference */
/*                                                                          */
dcl encrypt$decrypt entry (
	bit(32) aligned reference,
	character(*),
	character(*),
	bit(32) aligned reference optional truncate,
	bit(32) aligned reference optional truncate)
	returns (fixed binary(31));
/*                                                                          */
/* Disassociates the encryption context and releases it                     */
/* Accepts following arguments                                              */
/*   context : type - longword integer signed; access - read/write; mechanism - by reference */
/*                                                                          */
dcl encrypt$fini entry (
	bit(32) aligned reference,
	bit(32) aligned reference optional truncate)
	returns (fixed binary(31));
/*                                                                          */
/* Gains access to the statistics maintained by the Encryption software     */
/* Accepts following arguments                                              */
/*   context : type - longword; access - read only; mechanism - by reference */
/*   code : type - longword; access - read only; mechanism - by reference   */
/*   destination : type - char_string; access - write only; mechanism - by descriptor */
/*   return-length : type - longword; access - write only; mechanism - by reference */
/*                                                                          */
dcl encrypt$statistics entry (
	bit(32) aligned reference,
	bit(32) aligned reference,
	character(*),
	bit(32) aligned reference)
	returns (fixed binary(31));
/*                                                                          */
/* Places a key definition into the process, group, job, or system key storage table */
/* Accepts following arguments                                              */
/*   key-name : type - char_string; access - read only; mechanism - by descriptor */
/*   key-value : type - char_string; access - read only; mechanism - by descriptor */
/*   key-flags : type - longword; access - read only; mechanism - by reference */
/*                                                                          */
dcl encrypt$define_key entry (
	character(*),
	character(*),
	bit(32) aligned reference,
	bit(32) aligned reference optional truncate)
	returns (fixed binary(31));
/*                                                                          */
/* Deletes a key definition from a key storage table                        */
/* Accepts following arguments                                              */
/*   key-name : type - char_string; access - read only; mechanism - by descriptor */
/*   key-flags : type - longword; access - read only; mechanism - by reference */
/*                                                                          */
dcl encrypt$delete_key entry (
	character(*),
	bit(32) aligned reference)
	returns (fixed binary(31));
/*                                                                          */
/* Encrypts or decrypts data files                                          */
/* Accepts following arguments                                              */
/*   input-file : type - char_string; access - read only; mechanism - by descriptor */
/*   output-file : type - char_string; access - read only; mechanism - by descriptor */
/*   key-name : type - char_string; access - read only; mechanism - by descriptor */
/*   algorithm : type - char_string; access - read only; mechanism - by descriptor */
/*   file-flags : type - longword; access - read only; mechanism - by reference */
/*  [item-list] : type - item_list_3; access - read only; mechanism - by descriptor */
/*                                                                          */
dcl encrypt$encrypt_file entry (
	character(*),
	character(*),
	character(*),
	character(*),
	bit(32) aligned reference,
	bit(32) aligned reference optional truncate)
	returns (fixed binary(31));
/*                                                                          */
/* Encrypts a small amount of data in an encrypt stream                     */
/* Accepts following arguments                                              */
/*   input : type - char_string; access - read only; mechanism - by descriptor */
/*   output : type - char_string; access - write only; mechanism - by descriptor */
/*   key-name : type - char_string; access - read only; mechanism - by descriptor */
/*   algorithm : type - char_string; access - read only; mechanism - by descriptor */
/*                                                                          */
dcl encrypt$encrypt_one_record entry (
	character(*),
	character(*),
	character(*),
	character(*))
	returns (fixed binary(31));
/*                                                                          */
/* Decrypts a small amount of data on a decrypt stream                      */
/* Accepts following arguments                                              */
/*   input : type - char_string; access - read only; mechanism - by descriptor */
/*   output : type - char_string; access - write only; mechanism - by descriptor */
/*   key-name : type - char_string; access - read only; mechanism - by descriptor */
/*   algorithm : type - char_string; access - read only; mechanism - by descriptor */
/*                                                                          */
dcl encrypt$decrypt_one_record entry (
	character(*),
	character(*),
	character(*),
	character(*))
	returns (fixed binary(31));
/*                                                                          */
/* Generates a random key value                                             */
/* Accepts following arguments                                              */
/*   algorithm-name : type - char_string; access - read only; mechanism - by descriptor */
/*   key-length : type - word unsigned; access - read only; mechanism - by reference */
/*  [factor-a] : type - char_string; access - read only; mechanism - by descriptor */
/*  [factor-b] : type - char_string; access - read only; mechanism - by descriptor */
/*  [factor-c] : type - char_string; access - read only; mechanism - by descriptor */
/*  [key-buffer] : type - char_string; access - write; mechanism - by descriptor */
/*                                                                          */
dcl encrypt$generate_key entry (
	character(*),
	bit(32) aligned reference,
	character(*),
	character(*),
	character(*),
	character(*))
	returns (fixed binary(31));
/*                                                                          */
/* Unsupported calls                                                        */
/*                                                                          */
dcl encrypt$init_asyn entry (
	bit(32) aligned reference,
	bit(32) aligned reference,
	pointer reference,
	bit(32) aligned reference,
	bit(64) aligned reference,
	bit(32) aligned reference)
	returns (fixed binary(31));
dcl encrypt$encrypt_asyn entry (
	bit(32) aligned reference,
	bit(32) aligned reference,
	character(*),
	character(*),
	pointer reference,
	bit(32) aligned reference,
	bit(64) aligned reference,
	bit(32) aligned reference)
	returns (fixed binary(31));
dcl encrypt$decrypt_asyn entry (
	bit(32) aligned reference,
	bit(32) aligned reference,
	character(*),
	character(*),
	pointer reference,
	bit(32) aligned reference,
	bit(64) aligned reference,
	bit(32) aligned reference)
	returns (fixed binary(31));
dcl encrypt$fini_asyn entry (
	bit(32) aligned reference,
	bit(32) aligned reference,
	pointer reference,
	bit(32) aligned reference,
	bit(64) aligned reference,
	bit(32) aligned reference)
	returns (fixed binary(31));
dcl encrypt$sync_asyn entry (
	bit(32) aligned reference,
	bit(32) aligned reference,
	bit(64) aligned reference)
	returns (fixed binary(31));
