BN_zero 3 2003-07-24 0.9.9-dev OpenSSL

NAME

BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word - BIGNUM assignment operations

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 


 int BN_zero(BIGNUM *a);
 int BN_one(BIGNUM *a);


 const BIGNUM *BN_value_one(void);


 int BN_set_word(BIGNUM *a, unsigned long w);
 unsigned long BN_get_word(BIGNUM *a);

DESCRIPTION

_B_N___z_e_r_o_(_), _B_N___o_n_e_(_) and _B_N___s_e_t___w_o_r_d_(_) set aa to the values 0, 1 and ww respectively. _B_N___z_e_r_o_(_) and _B_N___o_n_e_(_) are macros.

_B_N___v_a_l_u_e___o_n_e_(_) returns a BBIIGGNNUUMM constant of value 1. This constant is useful for use in comparisons and assignment.

_B_N___g_e_t___w_o_r_d_(_) returns aa, if it can be represented as an unsigned long.

RETURN VALUES

_B_N___g_e_t___w_o_r_d_(_) returns the value aa, and 0xffffffffL if aa cannot be represented as an unsigned long.

_B_N___z_e_r_o_(_), _B_N___o_n_e_(_) and _B_N___s_e_t___w_o_r_d_(_) return 1 on success, 0 otherwise. _B_N___v_a_l_u_e___o_n_e_(_) returns the constant.

BUGS

Someone might change the constant.

If a BBIIGGNNUUMM is equal to 0xffffffffL it can be represented as an unsigned long but this value is also returned on error.

SEE ALSO

_o_p_e_n_s_s_l___b_n(3), _B_N___b_n_2_b_i_n(3)

HISTORY

_B_N___z_e_r_o_(_), _B_N___o_n_e_(_) and _B_N___s_e_t___w_o_r_d_(_) are available in all versions of SSLeay and OpenSSL. _B_N___v_a_l_u_e___o_n_e_(_) and _B_N___g_e_t___w_o_r_d_(_) were added in SSLeay 0.8.

_B_N___v_a_l_u_e___o_n_e_(_) was changed to return a true const BIGNUM * in OpenSSL 0.9.7.