Groovy web console

subscribe to the feed Subscribe
to this
site

Groovy Encode Base64

Published 2 months ago by Leo
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def s = 'PPMPMBRPEAPP5925'

String encoded = s.bytes.encodeBase64().toString()
println encoded

byte[] decoded = encoded.decodeBase64()
d = new String(decoded)
println d
assert s == d