Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
158 views
in Technique[技术] by (71.8m points)

java - Base64 encoding Allowed Characters

I'm using Base64 encoding for encoding user id field in Java.

String abc = new String(Base64.encodeBase64("Actualuseridfield"));

I want to know whether the string abc above will contain the character " , : or not?

When the Base64 encoded string is returned in abc, will it ever contain below characters?

" <double quote> 
, <comma> 
: <colon>
question from:https://stackoverflow.com/questions/16681007/base64-encoding-allowed-characters

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You will not see any commas, colons, or double quotes in a Base64 encoded string. You will see equals signs since they're used to pad the ending content.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...