Base64: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


=Internal=
=Internal=
=Overview=
The Base64 encoding is a binary data encoding scheme designed to represent arbitrary sequences of octets in a form that allows the use of both upper- and lowercase letters (so it can be embedded where text goes) but that need not be human readable.


=TO Process=
=TO Process=
Line 14: Line 10:
* http://localhost:9627/personal/Wiki.jsp?page=Base64Encoder1
* http://localhost:9627/personal/Wiki.jsp?page=Base64Encoder1
</font>
</font>
=Overview=
The Base64 encoding is a binary data encoding scheme designed to represent arbitrary sequences of octets in a form that allows the use of both upper- and lowercase letters (so it can be embedded where text goes) but that need not be human readable.
=java.util.Base64=
* https://docs.oracle.com/javase/8/docs/api/java/util/Base64.html
<syntaxhighlight lang='java'>
import java.util.Base64;
...
Base64.getMimeEncoder().encodeToString(s.getBytes());
Base64.getEncoder()
new String(Base64.getMimeDecoder().decode(s));
Base64.getDecoder()
</syntaxhighlight>

Revision as of 01:33, 28 November 2018

External

Internal

TO Process


Overview

The Base64 encoding is a binary data encoding scheme designed to represent arbitrary sequences of octets in a form that allows the use of both upper- and lowercase letters (so it can be embedded where text goes) but that need not be human readable.

java.util.Base64

import java.util.Base64;

...

Base64.getMimeEncoder().encodeToString(s.getBytes());

Base64.getEncoder()

new String(Base64.getMimeDecoder().decode(s));

Base64.getDecoder()