Skip to content

Instantly share code, notes, and snippets.

View lonly197's full-sized avatar
💭
I may be slow to respond.

lonly lonly197

💭
I may be slow to respond.
View GitHub Profile
// Base64 encode
val text = "This is plaintext."
val bytesEncoded = java.util.Base64.getEncoder.encode(text.getBytes())
// Base64 decode
val textDecoded = new String(java.util.Base64.getDecoder.decode(bytesEncoded))
println(textDecoded)