]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/OSSL_DECODER_from_bio.pod
ENCODER / DECODER: Add functions to encode/decode to/from a buffer
[thirdparty/openssl.git] / doc / man3 / OSSL_DECODER_from_bio.pod
CommitLineData
ece9304c
RL
1=pod
2
3=head1 NAME
4
25cf949f 5OSSL_DECODER_from_data,
ece9304c 6OSSL_DECODER_from_bio,
48b62fb3 7OSSL_DECODER_from_fp
ece9304c
RL
8- Routines to perform a decoding
9
10=head1 SYNOPSIS
11
12 #include <openssl/decoder.h>
13
14 int OSSL_DECODER_from_bio(OSSL_DECODER_CTX *ctx, BIO *in);
15 int OSSL_DECODER_from_fp(OSSL_DECODER_CTX *ctx, FILE *fp);
25cf949f
RL
16 int OSSL_DECODER_from_data(OSSL_DECODER_CTX *ctx, const unsigned char **pdata,
17 size_t *pdata_len);
ece9304c 18
ece9304c
RL
19Feature availability macros:
20
21=over 4
22
23=item OSSL_DECODER_from_fp() is only available when B<OPENSSL_NO_STDIO>
24is undefined.
25
26=back
27
28=head1 DESCRIPTION
29
25cf949f
RL
30OSSL_DECODER_from_data() runs the decoding process for the context I<ctx>,
31with input coming from I<*pdata>, I<*pdata_len> bytes long. Both I<*pdata>
32and I<*pdata_len> must be non-NULL. When OSSL_DECODER_from_data() returns,
33I<*pdata> is updated to point at the location after what has been decoded,
34and I<*pdata_len> to have the number of remaining bytes.
35
48b62fb3
RL
36OSSL_DECODER_from_bio() runs the decoding process for the context I<ctx>,
37with the input coming from the B<BIO> I<in>. Should it make a difference,
38it's recommended to have the BIO set in binary mode rather than text mode.
ece9304c
RL
39
40OSSL_DECODER_from_fp() does the same thing as OSSL_DECODER_from_bio(),
41except that the input is coming from the B<FILE> I<fp>.
42
ece9304c
RL
43=head1 RETURN VALUES
44
48b62fb3
RL
45OSSL_DECODER_from_bio() and OSSL_DECODER_from_fp() return 1 on success, or 0
46on failure.
ece9304c
RL
47
48=begin comment TODO(3.0) Add examples!
49
50=head1 EXAMPLES
51
52Text, because pod2xxx doesn't like empty sections
53
54=end comment
55
56=head1 SEE ALSO
57
58L<provider(7)>, L<OSSL_DECODER_CTX(3)>
59
60=head1 HISTORY
61
62The functions described here were added in OpenSSL 3.0.
63
64=head1 COPYRIGHT
65
66Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
67
68Licensed under the Apache License 2.0 (the "License"). You may not use
69this file except in compliance with the License. You can obtain a copy
70in the file LICENSE in the source distribution or at
71L<https://www.openssl.org/source/license.html>.
72
73=cut