|
| B_SetKeyInfo |
|
| |
B_SetKeyInfo |
| |
|
| |
int B_SetKeyInfo ( |
| |
B_KEY_OBJ | keyObject, | /* key object */ |
B_INFO_TYPE | infoType, | /* type of key information */ |
POINTER | info | /* key information */ |
); |
|
|
|
|
|
Description
B_SetKeyInfo sets the value of keyObject to the information pointed to by info. The format of the information is specified by infoType, which is one of the key info types with a KI_ prefix listed in Chapter 3. Also, some of the AI algorithm info types listed in Chapter 2 specify the key info type that should be used to set the key object needed by the algorithm. A separate copy of the information supplied by info is allocated inside the key object so that info may be changed after the call to B_SetKeyInfo. B_SetKeyInfo returns BE_WRONG_KEY_INFO if the key type encoded in info is not the type expected by infoType.
Once a key object has been set, it should not be reset; that is, do not call B_SetKeyInfo twice on a single created key object. Either create a new key object, or destroy an existing one and create it again.
Return value
Value | Description |
0 | Operation was successful. |
see Appendix A, | |
|
|
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 | 331 |