xref: /onnv-gate/usr/src/common/openssl/doc/crypto/BN_copy.pod (revision 2175:b0b2f052a486)
1*2175Sjp161948=pod
2*2175Sjp161948
3*2175Sjp161948=head1 NAME
4*2175Sjp161948
5*2175Sjp161948BN_copy, BN_dup - copy BIGNUMs
6*2175Sjp161948
7*2175Sjp161948=head1 SYNOPSIS
8*2175Sjp161948
9*2175Sjp161948 #include <openssl/bn.h>
10*2175Sjp161948
11*2175Sjp161948 BIGNUM *BN_copy(BIGNUM *to, const BIGNUM *from);
12*2175Sjp161948
13*2175Sjp161948 BIGNUM *BN_dup(const BIGNUM *from);
14*2175Sjp161948
15*2175Sjp161948=head1 DESCRIPTION
16*2175Sjp161948
17*2175Sjp161948BN_copy() copies B<from> to B<to>. BN_dup() creates a new B<BIGNUM>
18*2175Sjp161948containing the value B<from>.
19*2175Sjp161948
20*2175Sjp161948=head1 RETURN VALUES
21*2175Sjp161948
22*2175Sjp161948BN_copy() returns B<to> on success, NULL on error. BN_dup() returns
23*2175Sjp161948the new B<BIGNUM>, and NULL on error. The error codes can be obtained
24*2175Sjp161948by L<ERR_get_error(3)|ERR_get_error(3)>.
25*2175Sjp161948
26*2175Sjp161948=head1 SEE ALSO
27*2175Sjp161948
28*2175Sjp161948L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>
29*2175Sjp161948
30*2175Sjp161948=head1 HISTORY
31*2175Sjp161948
32*2175Sjp161948BN_copy() and BN_dup() are available in all versions of SSLeay and OpenSSL.
33*2175Sjp161948
34*2175Sjp161948=cut
35