Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What characters uses base64encode?

Tags:

html

php

base64

I refer to the base64 encode function like seen here

It might sound stupid but which characters does this use??

I know letter, digits and 've seen also the equal-sign (=). But i search for a 100% definition.

I need this because i use a base_64 encoded string in supposed-to-be valid html as an attribute and want to avoid conflicts.

like image 998
Email Avatar asked Feb 22 '23 03:02

Email


1 Answers

The default character set of the Base 64 encoding is AZ (0–25), az (26–51), 09 (52–61), + (62), and / (63). The = is used as padding character to fill the value up to a length of a multiple of 24 bits.

There are also alternative character sets like one that is safe to be used in URLs. But you could also use any other character set.

like image 199
Gumbo Avatar answered Feb 24 '23 19:02

Gumbo