BN_new 3 2005-11-24 0.9.9-dev OpenSSL

NAME

BN_new, BN_init, BN_clear, BN_free, BN_clear_free - allocate and free BIGNUMs

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 


 BIGNUM *BN_new(void);


 void BN_init(BIGNUM *);


 void BN_clear(BIGNUM *a);


 void BN_free(BIGNUM *a);


 void BN_clear_free(BIGNUM *a);

DESCRIPTION

_B_N___n_e_w_(_) allocates and initializes a BBIIGGNNUUMM structure. _B_N___i_n_i_t_(_) initializes an existing uninitialized BBIIGGNNUUMM.

_B_N___c_l_e_a_r_(_) is used to destroy sensitive data such as keys when they are no longer needed. It erases the memory used by aa and sets it to the value 0.

_B_N___f_r_e_e_(_) frees the components of the BBIIGGNNUUMM, and if it was created by _B_N___n_e_w_(_), also the structure itself. _B_N___c_l_e_a_r___f_r_e_e_(_) additionally overwrites the data before the memory is returned to the system.

RETURN VALUES

_B_N___n_e_w_(_) returns a pointer to the BBIIGGNNUUMM. If the allocation fails, it returns NNUULLLL and sets an error code that can be obtained by _E_R_R___g_e_t___e_r_r_o_r(3).

_B_N___i_n_i_t_(_), _B_N___c_l_e_a_r_(_), _B_N___f_r_e_e_(_) and _B_N___c_l_e_a_r___f_r_e_e_(_) have no return values.

SEE ALSO

_o_p_e_n_s_s_l___b_n(3), _E_R_R___g_e_t___e_r_r_o_r(3)

HISTORY

_B_N___n_e_w_(_), _B_N___c_l_e_a_r_(_), _B_N___f_r_e_e_(_) and _B_N___c_l_e_a_r___f_r_e_e_(_) are available in all versions on SSLeay and OpenSSL. _B_N___i_n_i_t_(_) was added in SSLeay 0.9.1b.