CryptoSys PKI Pro Manual

rsaEncodeMsg

Encode an EME or EMSA encoded message block according to PKCS#1.

Syntax

[VBA]
Public Function rsaEncodeMsg ( _
    nBlockLen As Long, _
    lpInput() As Byte, _
    nOptions As Long _
) As Byte()

Parameters

nBlockLen
Length of output block in bytes (required).
lpInput
Data to be encoded.
nOptions
Include one of the following:
PKI_EME_PKCSV1_5
PKI_EME_OAEP
PKI_EMSIG_PKCSV1_5
If you have selected PKI_EMSIG_PKCSV1_5, then add one of these options to set the hash function for the signature message digest:
PKI_HASH_SHA1
PKI_HASH_SHA224
PKI_HASH_SHA256
PKI_HASH_SHA384
PKI_HASH_SHA512
PKI_HASH_MD5
PKI_HASH_MD2
and optionally add PKI_EMSIG_DIGESTONLY as a flag to pass the message digest only as input to-be-signed (default = pass entire message).
If you have selected PKI_EME_OAEP, then add one of these options to set the hash function used for EME-OAEP encoding:
PKI_HASH_SHA1
PKI_HASH_SHA224
PKI_HASH_SHA256
PKI_HASH_SHA384
PKI_HASH_SHA512
and optionally add PKI_MGF_MGF1SHA1 to force the MGF hash function to be SHA-1 (default = same as encoding hash function set above).
Alternatively, ignore all the above and use the specialist option PKI_EMSIG_ISO9796 to use the ISO9796-1 encoding for a signature.

Return Value

Byte(): Encoded message block.

Remarks

EME = Encoding Method for Encryption, EMSA = Encoding Method for Signature with Appendix.
[PREV: rsaDecrypt...]   [Contents]   [Index]   
   [NEXT: rsaEncrypt...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.