Document alternative functions to BIO_f_base64. Also point out that we're a cryptography library, not a text encoding library. Not that that'll dissuade anyone. Change-Id: Ia324e08c5cdd108fa182d2610f80447262e0bd5c Reviewed-on: https://boringssl-review.googlesource.com/31664 Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/base64.h b/include/openssl/base64.h index ef76088..c88546d 100644 --- a/include/openssl/base64.h +++ b/include/openssl/base64.h
@@ -67,7 +67,10 @@ // base64 functions. // // For historical reasons, these functions have the EVP_ prefix but just do -// base64 encoding and decoding. +// base64 encoding and decoding. Note that BoringSSL is a cryptography library, +// so these functions are implemented with side channel protections, at a +// performance cost. For other base64 uses, use a general-purpose base64 +// implementation. // Encoding
diff --git a/include/openssl/bio.h b/include/openssl/bio.h index 2e056a1..70c2fbf 100644 --- a/include/openssl/bio.h +++ b/include/openssl/bio.h
@@ -729,6 +729,8 @@ // |BIO_flush| when done writing, to signal that no more data are to be // encoded. The flag |BIO_FLAGS_BASE64_NO_NL| may be set to encode all the data // on one line. +// +// Use |EVP_EncodeBlock| and |EVP_DecodeBase64| instead. OPENSSL_EXPORT const BIO_METHOD *BIO_f_base64(void); OPENSSL_EXPORT void BIO_set_retry_special(BIO *bio);