Current Path : /usr/opt/openssl11/share/doc/openssl/html/man3/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/openssl11/share/doc/openssl/html/man3/BN_zero.html |
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>BN_zero</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:root@hsxx.drive.ne.jp" /> </head> <body style="background-color: white"> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#return_values">RETURN VALUES</a></li> <li><a href="#bugs">BUGS</a></li> <li><a href="#see_also">SEE ALSO</a></li> <li><a href="#history">HISTORY</a></li> <li><a href="#copyright">COPYRIGHT</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <hr /> <h1><a name="name">NAME</a></h1> <p>BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word - BIGNUM assignment operations</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> #include <openssl/bn.h></pre> <pre> void BN_zero(BIGNUM *a); int BN_one(BIGNUM *a);</pre> <pre> const BIGNUM *BN_value_one(void);</pre> <pre> int BN_set_word(BIGNUM *a, BN_ULONG w); unsigned BN_ULONG BN_get_word(BIGNUM *a);</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p><strong>BN_ULONG</strong> is a macro that will be an unsigned integral type optimized for the most efficient implementation on the local platform.</p> <p><code>BN_zero()</code>, <code>BN_one()</code> and <code>BN_set_word()</code> set <strong>a</strong> to the values 0, 1 and <strong>w</strong> respectively. <code>BN_zero()</code> and <code>BN_one()</code> are macros.</p> <p><code>BN_value_one()</code> returns a <strong>BIGNUM</strong> constant of value 1. This constant is useful for use in comparisons and assignment.</p> <p><code>BN_get_word()</code> returns <strong>a</strong>, if it can be represented as a <strong>BN_ULONG</strong>.</p> <p> </p> <hr /> <h1><a name="return_values">RETURN VALUES</a></h1> <p><code>BN_get_word()</code> returns the value <strong>a</strong>, or all-bits-set if <strong>a</strong> cannot be represented as a single integer.</p> <p><code>BN_one()</code> and <code>BN_set_word()</code> return 1 on success, 0 otherwise. <code>BN_value_one()</code> returns the constant. <code>BN_zero()</code> never fails and returns no value.</p> <p> </p> <hr /> <h1><a name="bugs">BUGS</a></h1> <p>If a <strong>BIGNUM</strong> is equal to the value of all-bits-set, it will collide with the error condition returned by <code>BN_get_word()</code> which uses that as an error value.</p> <p><strong>BN_ULONG</strong> should probably be a typedef.</p> <p> </p> <hr /> <h1><a name="see_also">SEE ALSO</a></h1> <p><em>BN_bn2bin(3)</em></p> <p> </p> <hr /> <h1><a name="history">HISTORY</a></h1> <p>In OpenSSL 0.9.8, <code>BN_zero()</code> was changed to not return a value; previous versions returned an int.</p> <p> </p> <hr /> <h1><a name="copyright">COPYRIGHT</a></h1> <p>Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.</p> <p>Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p> </body> </html>