B_GetKeyInfo

 

 

B_GetKeyInfo

 

 

 

int B_GetKeyInfo (

 

POINTER

*info,

/* key information */

B_KEY_OBJ

keyObject,

/* key object */

B_INFO_TYPE infoType

/* type of key information */

);

 

 

 

 

 

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

Value

Description

0

Operation was successful.

non-zero

see Appendix A, ”Crypto-C Error Types”

 

 

C h a p t e r 4 D e t a i l s o f C r y p t o - C F u n c t i o n s

323

Page 333
Image 333
RSA Security 5 manual Int BGetKeyInfo