diff options
Diffstat (limited to 'upstream/debian-unstable/man3/BN_bn2bin.3ssl')
-rw-r--r-- | upstream/debian-unstable/man3/BN_bn2bin.3ssl | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/upstream/debian-unstable/man3/BN_bn2bin.3ssl b/upstream/debian-unstable/man3/BN_bn2bin.3ssl index e652a4ed..fed69b1f 100644 --- a/upstream/debian-unstable/man3/BN_bn2bin.3ssl +++ b/upstream/debian-unstable/man3/BN_bn2bin.3ssl @@ -55,15 +55,16 @@ .\" ======================================================================== .\" .IX Title "BN_BN2BIN 3SSL" -.TH BN_BN2BIN 3SSL 2024-02-03 3.1.5 OpenSSL +.TH BN_BN2BIN 3SSL 2024-04-04 3.2.2-dev OpenSSL .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME -BN_bn2binpad, -BN_bn2bin, BN_bin2bn, BN_bn2lebinpad, BN_lebin2bn, -BN_bn2nativepad, BN_native2bn, BN_bn2hex, BN_bn2dec, BN_hex2bn, BN_dec2bn, +BN_bn2binpad, BN_signed_bn2bin, BN_bn2bin, BN_bin2bn, BN_signed_bin2bn, +BN_bn2lebinpad, BN_signed_bn2lebin, BN_lebin2bn, BN_signed_lebin2bn, +BN_bn2nativepad, BN_signed_bn2native, BN_native2bn, BN_signed_native2bn, +BN_bn2hex, BN_bn2dec, BN_hex2bn, BN_dec2bn, BN_print, BN_print_fp, BN_bn2mpi, BN_mpi2bn \- format conversions .SH SYNOPSIS .IX Header "SYNOPSIS" @@ -72,13 +73,19 @@ BN_print, BN_print_fp, BN_bn2mpi, BN_mpi2bn \- format conversions \& \& int BN_bn2bin(const BIGNUM *a, unsigned char *to); \& int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen); +\& int BN_signed_bn2bin(const BIGNUM *a, unsigned char *to, int tolen); \& BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret); +\& BIGNUM *BN_signed_bin2bn(const unsigned char *s, int len, BIGNUM *ret); \& \& int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen); +\& int BN_signed_bn2lebin(const BIGNUM *a, unsigned char *to, int tolen); \& BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret); +\& BIGNUM *BN_signed_lebin2bn(const unsigned char *s, int len, BIGNUM *ret); \& \& int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen); +\& int BN_signed_bn2native(const BIGNUM *a, unsigned char *to, int tolen); \& BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret); +\& BIGNUM *BN_signed_native2bn(const unsigned char *s, int len, BIGNUM *ret); \& \& char *BN_bn2hex(const BIGNUM *a); \& char *BN_bn2dec(const BIGNUM *a); @@ -102,17 +109,29 @@ and stores it at \fBto\fR. \fBtolen\fR indicates the length of the output buffer \&\fBto\fR. The result is padded with zeros if necessary. If \fBtolen\fR is less than BN_num_bytes(\fBa\fR) an error is returned. .PP +\&\fBBN_signed_bn2bin()\fR converts the value of \fBa\fR into big-endian signed 2's +complements form and stores it at \fBto\fR. \fBtolen\fR indicates the length of +the output buffer \fBto\fR. The result is signed extended (padded with 0x00 +for positive numbers or with 0xff for negative numbers) if necessary. +If \fBtolen\fR is smaller than the necessary size (which may be +\&\f(CW\*(C`<BN_num_bytes(\fR\f(CBa\fR\f(CW) + 1\*(C'\fR>), an error is returned. +.PP \&\fBBN_bin2bn()\fR converts the positive integer in big-endian form of length \&\fBlen\fR at \fBs\fR into a \fBBIGNUM\fR and places it in \fBret\fR. If \fBret\fR is NULL, a new \fBBIGNUM\fR is created. .PP -\&\fBBN_bn2lebinpad()\fR and \fBBN_lebin2bn()\fR are identical to \fBBN_bn2binpad()\fR and -\&\fBBN_bin2bn()\fR except the buffer is in little-endian format. +\&\fBBN_signed_bin2bn()\fR converts the integer in big-endian signed 2's complement +form of length \fBlen\fR at \fBs\fR into a \fBBIGNUM\fR and places it in \fBret\fR. If +\&\fBret\fR is NULL, a new \fBBIGNUM\fR is created. +.PP +\&\fBBN_bn2lebinpad()\fR, \fBBN_signed_bn2lebin()\fR and \fBBN_lebin2bn()\fR are identical to +\&\fBBN_bn2binpad()\fR, \fBBN_signed_bn2bin()\fR and \fBBN_bin2bn()\fR except the buffer is in +little-endian format. .PP -\&\fBBN_bn2nativepad()\fR and \fBBN_native2bn()\fR are identical to \fBBN_bn2binpad()\fR and -\&\fBBN_bin2bn()\fR except the buffer is in native format, i.e. most significant -byte first on big-endian platforms, and least significant byte first on -little-endian platforms. +\&\fBBN_bn2nativepad()\fR, \fBBN_signed_bn2native()\fR and \fBBN_native2bn()\fR are identical +to \fBBN_bn2binpad()\fR, \fBBN_signed_bn2bin()\fR and \fBBN_bin2bn()\fR except the buffer is +in native format, i.e. most significant byte first on big-endian platforms, +and least significant byte first on little-endian platforms. .PP \&\fBBN_bn2hex()\fR and \fBBN_bn2dec()\fR return printable strings containing the hexadecimal and decimal encoding of \fBa\fR respectively. For negative @@ -149,8 +168,9 @@ if \fBret\fR is NULL. \&\fBBN_bn2bin()\fR returns the length of the big-endian number placed at \fBto\fR. \&\fBBN_bin2bn()\fR returns the \fBBIGNUM\fR, NULL on error. .PP -\&\fBBN_bn2binpad()\fR, \fBBN_bn2lebinpad()\fR, and \fBBN_bn2nativepad()\fR return the number of bytes written or \-1 if the supplied -buffer is too small. +\&\fBBN_bn2binpad()\fR, \fBBN_signed_bn2bin()\fR, \fBBN_bn2lebinpad()\fR, \fBBN_signed_bn2lebin()\fR, +\&\fBBN_bn2nativepad()\fR, and_signed \fBBN_bn2native()\fR return the number of bytes +written or \-1 if the supplied buffer is too small. .PP \&\fBBN_bn2hex()\fR and \fBBN_bn2dec()\fR return a NUL-terminated string, or NULL on error. \fBBN_hex2bn()\fR and \fBBN_dec2bn()\fR return the number of characters @@ -170,7 +190,7 @@ The error codes can be obtained by \fBERR_get_error\fR\|(3). \&\fBBN_num_bytes\fR\|(3) .SH COPYRIGHT .IX Header "COPYRIGHT" -Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000\-2022 The OpenSSL Project Authors. All Rights Reserved. .PP Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy |