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.  If a
33       is NULL, nothing is done.
34

RETURN VALUES

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

SEE ALSO

44       bn(3), ERR_get_error(3)
45

HISTORY

47       BN_new(), BN_clear(), BN_free() and BN_clear_free() are available in
48       all versions on SSLeay and OpenSSL.  BN_init() was added in SSLeay
49       0.9.1b.
50
51
52
531.0.2o                            2019-09-10                         BN_new(3)
Impressum