1BN_new(3)                           OpenSSL                          BN_new(3)
2
3
4

NAME

6       BN_new, BN_init, BN_clear, BN_free, BN_clear_free - allocate and free
7       BIGNUMs
8

SYNOPSIS

10        #include <openssl/bn.h>
11
12        BIGNUM *BN_new(void);
13
14        void BN_init(BIGNUM *);
15
16        void BN_clear(BIGNUM *a);
17
18        void BN_free(BIGNUM *a);
19
20        void BN_clear_free(BIGNUM *a);
21

DESCRIPTION

23       BN_new() allocates and initializes a BIGNUM structure. BN_init()
24       initializes an existing uninitialized BIGNUM.
25
26       BN_clear() is used to destroy sensitive data such as keys when they are
27       no longer needed. It erases the memory used by a and sets it to the
28       value 0.
29
30       BN_free() frees the components of the BIGNUM, and if it was created by
31       BN_new(), also the structure itself. BN_clear_free() additionally
32       overwrites the data before the memory is returned to the system.
33

RETURN VALUES

35       BN_new() returns a pointer to the BIGNUM. If the allocation fails, it
36       returns NULL and sets an error code that can be obtained by
37       ERR_get_error(3).
38
39       BN_init(), BN_clear(), BN_free() and BN_clear_free() have no return
40       values.
41

SEE ALSO

43       bn(3), ERR_get_error(3)
44

HISTORY

46       BN_new(), BN_clear(), BN_free() and BN_clear_free() are available in
47       all versions on SSLeay and OpenSSL.  BN_init() was added in SSLeay
48       0.9.1b.
49
50
51
521.0.0e                            2004-03-06                         BN_new(3)
Impressum