Chapter 4 Details of Crypto-C Functions 323
B_GetKeyInfo
B_GetKeyInfo
Description
B_GetKeyInfo gets the information held by
keyObject
in the format specified by
infoType
, storing the result in
info
. The value of
infoType
is one of the key info types
with a KI_ prefix listed in Chapter 3. The format of the information returned by
B_GetKeyInfo is not always identical to the format supplied to B_SetKeyInfo because
B_SetKeyInfo may convert the key data to canonical form before storing it in the key
object. For example, KI_DES8 sets the DES parity before storing, KI_RSAPublicBER
converts a BER encoding to DER, and KI_RSAPublic strips off leading zeros from the
modulus and exponent integers.
Return value
int B_GetKeyInfo (
POINTER *info, /* key information */
B_KEY_OBJ keyObject, /* key object */
B_INFO_TYPE infoType /* type of key information */
);
Value Description
0 Operation was successful.
non-zero see Appendix A, ”Crypto-C Error Types”