OSSL_DECODER_from_bio.pod 1.9 KB

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