RSA Security 5 Projection Television User Manual


 
B_SetAlgorithmInfo
330 RSA BSAFE Crypto-C Library Reference Manual
B_SetAlgorithmInfo
Description
B_SetAlgorithmInfo sets the parameters of
algorithmObject
to the information
pointed to by
info
. The type of algorithm and the format of the parameters is specified
by
infoType
, which is one of the algorithm info types with an AI_ prefix listed in
Chapter 2. A separate copy of the information supplied by
info
is allocated inside the
algorithm object so that
info
may be changed after the call to B_SetAlgorithmInfo.
B_SetAlgorithmInfo returns BE_WRONG_ALGORITHM_INFO if the algorithm type
encoded in
info
is not the type expected by
infoType.
Once an algorithm object has been set, it should not be reset; that is, do not call
B_SetAlgorithmInfo twice on a single created algorithm object. Either create a new
algorithm object, or destroy an existing one and create it again.
Return value
int B_SetAlgorithmInfo (
B_ALGORITHM_OBJ algorithmObject, /* algorithm object */
B_INFO_TYPE infoType, /* type of algorithm information */
POINTER info /* algorithm information */
);
Value Description
0 Operation was successful.
non-zero see Appendix A, ”Crypto-C Error Types”