add base64url_strict_encode()

This commit is contained in:
Steffen Jaeckel 2017-02-21 00:37:16 +01:00 committed by Karel Miko
parent 006c601efb
commit eee936d752
2 changed files with 8 additions and 0 deletions

View File

@ -12,6 +12,8 @@ int base64_strict_decode(const unsigned char *in, unsigned long len,
#ifdef LTC_BASE64_URL
int base64url_encode(const unsigned char *in, unsigned long len,
unsigned char *out, unsigned long *outlen);
int base64url_strict_encode(const unsigned char *in, unsigned long inlen,
unsigned char *out, unsigned long *outlen);
int base64url_decode(const unsigned char *in, unsigned long len,
unsigned char *out, unsigned long *outlen);

View File

@ -110,6 +110,12 @@ int base64url_encode(const unsigned char *in, unsigned long inlen,
{
return _base64_encode_internal(in, inlen, out, outlen, codes_base64url, 0);
}
int base64url_strict_encode(const unsigned char *in, unsigned long inlen,
unsigned char *out, unsigned long *outlen)
{
return _base64_encode_internal(in, inlen, out, outlen, codes_base64url, 1);
}
#endif /* LTC_BASE64_URL */
#endif