!CRYPTO.DEF [104] - Symbols used in CRYPTO.SBR
!-------------------.-------------------.-------------------.-------------------.
!EDIT HISTORY
! VEDIT=104
! Note: history reformatted 9-Feb-17
! [104] 21-Jul-20 / jdm / Add CRYPTO_MODE_SHA3_xxx (ashnet 1.14.173)
! [103] 16-May-18 / jdm / Add CRYPTOP_HMAC, CRYPTO_MODE_xxx (hash algorithms)
! [102] 11-Dec-16 / jdm / Added new symbols for 6.3.1539.0
! [101] 19-May-14 / jdm / Added new symbols for 6.1.1385.0
! [100] 29-Jun-13 / jdm / Created
!-------------------.-------------------.-------------------.-------------------.

! CRYPT opcodes
define CRYPTOP_ENCRYPT     = 1        
define CRYPTOP_DECRYPT     = 2
define CRYPTOP_GENKEY      = 3     ! generate key data
define CRYPTOP_ENCODE      = 4     ! encode/decode
define CRYPTOP_DECODE      = 5     ! [101] (same as decode)
define CRYPTOP_GENPUBKEY   = 6     ! [101] gen private/public key pair
define CRYPTOP_HMAC        = 7     ! [103] HMAC-xxx (see CRYPTOP_MODE_xxx)

! CRYPT ciphers
define CRYPTO_CIPHER_NA     = 0     ! not applicable (encode/decode only)
define CRYPTO_CIPHER_RSA    = 1     ! public/private key 
define CRYPTO_CIPHER_AES    = 2     ! symmetric
define CRYPTO_CIPHER_DSA    = 3     ! [101] DSA (Public key)

! CRYPT modes
! CRYPTOP_ENCODE with CRYPTO_CIPHER_AES---
define CRYPTO_MODE_ECB      = 1     ! Electronic Cookbook
define CRYPTO_MODE_CBC      = 2     ! Cipher Block Chaining
define CRYPTO_MODE_RFC4716  = 3     ! [101] (pub key format)
define CRYPTO_MODE_CTR	    = 4		! [102] Counter Mode
define CRYPTO_MODE_CFB	    = 5		! [102] Cipher Feedback
define CRYPTO_MODE_OFB	    = 6		! [102] Output Feedback
define CRYPTO_MODE_GCM	    = 7		! [102] Galois/Counter Mode

! CRYPTOP_HMAC (hash algorithms)---
define CRYPTO_MODE_SHA1       = 20	! [103] HMAC-SHA1
define CRYPTO_MODE_SHA256     = 21  ! [103] HMAC-SHA256
define CRYPTO_MODE_SHA384     = 22  ! [103] HMAC-SHA384
define CRYPTO_MODE_SHA512     = 23  ! [103] HMAC-SHA512
define CRYPTO_MODE_MD2        = 24  ! [103] HMAC-MD2
define CRYPTO_MODE_MD5        = 25  ! [103] HMAC-MD5
define CRYPTO_MODE_RIPEMB128  = 26  ! [103] HMAC-RIPEMB128
define CRYPTO_MODE_RIPEMB160  = 27  ! [103] HMAC-RIPEMB160
define CRYPTO_MODE_RIPEMB256  = 28  ! [103] HMAC-RIPEMB256
define CRYPTO_MODE_RIPEMB320  = 29  ! [103] HMAC-RIPEMB320
define CRYPTO_MODE_SHA3_224   = 30	! [104] HMAC-SHA3-224
define CRYPTO_MODE_SHA3_256   = 31  ! [104] HMAC-SHA3-256
define CRYPTO_MODE_SHA3_384   = 32  ! [104] HMAC-SHA3-38484
define CRYPTO_MODE_SHA3_512   = 33  ! [104] HMAC-SHA3-512


! CRYPT padding options
define CRYPTO_PAD_NA        = -1    ! [102] not applicable
define CRYPTO_PAD_PKCS5     = 0
define CRYPTO_PAD_FIPS81    = 1
define CRYPTO_PAD_RAND      = 2
define CRYPTO_PAD_NULL      = 3
define CRYPTO_PAD_SPACE     = 4

! CFLAGS
define CRYPF_NONE          = &h0000 ! no flags
define CRYPF_SRCFILE       = &h0001 ! src arg is filespec
define CRYPF_SRCTEXT       = &h0002 ! src is text (else binary)
define CRYPF_DSTFILE       = &h0008 ! dst arg is filespec
define CRYPF_DSTTEXT       = &h0010 ! dst is text (else binary)
define CRYPF_KEYFILE       = &h0020 ! key arg is filespec
define CRYPF_KEYHEX        = &h0040 ! key is hex encoded (else binary)
define CRYPF_PUBKEY        = &h0200 ! use public key (else private)
define CRYPF_BIGENDIAN     = &h0400 ! use big endian (Openssl-order) else Microsoft-order
define CRYPF_IVHEX         = &h0800 ! [102] IV is hex encoded (else binary)


! error status
define CRYPTERR_TOOFEW     = -1    ! too few params
define CRYPTERR_NOMEM      = -2    ! can't malloc (or out of malloc hdls) 
define CRYPTERR_BADOPCODE  = -3    ! no such Opcode 
define CRYPTERR_PERR       = -4    ! misc param error 
define CRYPTERR_LIBLINK    = -5    ! can't dynamically link library 
define CRYPTERR_LICENSE    = -6    ! license failure
define CRYPTERR_ADDFILE    = -7    ! error during adding file (upload)
define CRYPTERR_SYNCREQ    = -8    ! error during SyncRequest
define CRYPTERR_POSTFILE   = -9    ! error processing file for post
define CRYPTERR_STRALC     = -10   ! unable to allocate string buf
define CRYPTERR_PUTREQ     = -11   ! error during put
define CRYPTERR_DOWNLOAD   = -12   ! error during download
define CRYPTERR_BADCIPHER  = -27   ! bad cipher type (CRYPT_CIPHER_xxx)
define CRYPTERR_BADKEYLEN  = -28   ! bad key len
define CRYPTERR_BADMODE    = -29   ! bad mode (CRYPT_MODE_xxx)
define CRYPTERR_BADPADDING = -30   ! bad padding (CRYPT_PAD_xxx)
define CRYPTERR_BADFILE    = -31   ! bad file or file error
define CRYPTERR_BADCRYPT   = -32   ! during encryption/decryption
define CRYPTERR_BADENCODE  = -33   ! bad encoding
define CRYPTERR_BADPUBKEY  = -34   ! bad public key
define CRYPTERR_BADPRVKEY  = -35   ! bad private key
define CRYPTERR_MISSING    = -98   ! missing CRYPT.SBX 
define CRYPTERR_PLATFORM   = -99   ! unsupported platform (CRYPT.SBR is Windows only)


