mirror of
https://github.com/postgres/postgres.git
synced 2025-04-20 00:42:27 +03:00
The result of pg_b64_encode() and pg_b64_decode() should be checked for errors. This attribute could detect mistakes such as those fixed in commit ff030ebe250 and d278541be42. Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Ranier Vilela <ranier.vf@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CAEudQAq-3yHsSdWoOOaw%2BgAQYgPMpMGuB5pt2yCXgv-YuxG2Hg%40mail.gmail.com
20 lines
541 B
C
20 lines
541 B
C
/*
|
|
* base64.h
|
|
* Encoding and decoding routines for base64 without whitespace
|
|
* support.
|
|
*
|
|
* Portions Copyright (c) 2001-2025, PostgreSQL Global Development Group
|
|
*
|
|
* src/include/common/base64.h
|
|
*/
|
|
#ifndef BASE64_H
|
|
#define BASE64_H
|
|
|
|
/* base 64 */
|
|
extern pg_nodiscard int pg_b64_encode(const char *src, int len, char *dst, int dstlen);
|
|
extern pg_nodiscard int pg_b64_decode(const char *src, int len, char *dst, int dstlen);
|
|
extern int pg_b64_enc_len(int srclen);
|
|
extern int pg_b64_dec_len(int srclen);
|
|
|
|
#endif /* BASE64_H */
|