summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/BN_zero.3
diff options
context:
space:
mode:
authorschwarze <>2015-02-23 17:43:24 +0000
committerschwarze <>2015-02-23 17:43:24 +0000
commit9cb1a51933a1847042ee88e16d560485f682bcad (patch)
tree5a76fb973ee649bdb33c7731bc1ca457abfcec1e /src/lib/libcrypto/man/BN_zero.3
parent2820d04ee847cb7bede0b25e49194c3ade7ebdbf (diff)
downloadopenbsd-9cb1a51933a1847042ee88e16d560485f682bcad.tar.gz
openbsd-9cb1a51933a1847042ee88e16d560485f682bcad.tar.bz2
openbsd-9cb1a51933a1847042ee88e16d560485f682bcad.zip
fourth batch of perlpod(1) to mdoc(7) conversion
Diffstat (limited to 'src/lib/libcrypto/man/BN_zero.3')
-rw-r--r--src/lib/libcrypto/man/BN_zero.3101
1 files changed, 101 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/BN_zero.3 b/src/lib/libcrypto/man/BN_zero.3
new file mode 100644
index 0000000000..adfd6a0c65
--- /dev/null
+++ b/src/lib/libcrypto/man/BN_zero.3
@@ -0,0 +1,101 @@
1.Dd $Mdocdate: February 23 2015 $
2.Dt BN_ZERO 3
3.Os
4.Sh NAME
5.Nm BN_zero ,
6.Nm BN_one ,
7.Nm BN_value_one ,
8.Nm BN_set_word ,
9.Nm BN_get_word
10.Nd BIGNUM assignment operations
11.Sh SYNOPSIS
12.In openssl/bn.h
13.Ft int
14.Fo BN_zero
15.Fa "BIGNUM *a"
16.Fc
17.Ft int
18.Fo BN_one
19.Fa "BIGNUM *a"
20.Fc
21.Ft const BIGNUM *
22.Fo BN_value_one
23.Fa void
24.Fc
25.Ft int
26.Fo BN_set_word
27.Fa "BIGNUM *a"
28.Fa "unsigned long w"
29.Fc
30.Ft unsigned long
31.Fo BN_get_word
32.Fa "BIGNUM *a"
33.Fc
34.Sh DESCRIPTION
35.Fn BN_zero ,
36.Fn BN_one ,
37and
38.Fn BN_set_word
39set
40.Fa a
41to the values 0, 1 and
42.Fa w
43respectively.
44.Fn BN_zero
45and
46.Fn BN_one
47are macros.
48.Pp
49.Fn BN_value_one
50returns a
51.Vt BIGNUM
52constant of value 1.
53This constant is useful for use in comparisons and assignment.
54.Pp
55.Fn BN_get_word
56returns
57.Fa a
58if it can be represented as an
59.Vt unsigned long .
60.Sh RETURN VALUES
61.Fn BN_get_word
62returns the value
63.Fa a ,
64or 0xffffffffL if
65.Fa a
66cannot be represented as an
67.Vt unsigned long .
68.Pp
69.Fn BN_zero ,
70.Fn BN_one ,
71and
72.Fn BN_set_word
73return 1 on success, 0 otherwise.
74.Fn BN_value_one
75returns the constant.
76.Sh SEE ALSO
77.Xr bn 3 ,
78.Xr BN_bn2bin 3
79.Sh HISTORY
80.Fn BN_zero ,
81.Fn BN_one ,
82and
83.Fn BN_set_word
84are available in all versions of SSLeay and OpenSSL.
85.Fn BN_value_one
86and
87.Fn BN_get_word
88were added in SSLeay 0.8.
89.Pp
90.Fn BN_value_one
91was changed to return a true
92.Vt const BIGNUM *
93in OpenSSL 0.9.7.
94.Sh BUGS
95Someone might change the constant.
96.Pp
97If a
98.Vt BIGNUM
99is equal to 0xffffffffL it can be represented as an
100.Vt unsigned long
101but this value is also returned on error.