RSA Security 5 Projection Television User Manual


 
Chapter 4 Details of Crypto-C Functions 317
B_GenerateKeypair
B_GenerateKeypair
Description
B_GenerateKeypair uses algorithmObject to generate a keypair, setting
publicKey
and
privateKey
to the result. The algorithm object for supplying random numbers is
randomAlgorithm
. The surrender context for processing and canceling during lengthy
operations is
surrenderContext
; if its value is (A_SURRENDER_CTX *)NULL_PTR, Crypto-C
does not use it.
algorithmObject
is reset to the state it was in after the call to
B_GenerateInit, so that another keypair generation may be performed. See
B_GenerateInit.
Return value
int B_GenerateKeypair (
B_ALGORITHM_OBJ algorithmObject, /* algorithm object */
B_KEY_OBJ publicKey, /* new public key */
B_KEY_OBJ privateKey, /* new private key */
B_ALGORITHM_OBJ randomAlgorithm, /* random algorithm */
A_SURRENDER_CTX *surrenderContext /* surrender context */
);
Value Description
0 Operation was successful.
non-zero see Appendix A, ”Crypto-C Error Types”