You can use built-in encodeBase64 method in Groovy:
assert "AQID" == ([1,2,3] as byte).encodeBase64() as String
And you saw, decodeBase64 is the opposite. Does that do what you want?
From: Nelson, Erick [mailto:Erick.Nelson@hdsupply.com]
Sent: Friday, May 12, 2017 10:07 PM
Subject: Re: Binary to Base64 Conversion
CONFIDENTIALITY NOTICE: This message is for intended addressee(s) only and may contain information that is
confidential, proprietary or exempt from disclosure, and subject to terms at: http://www.hdsupply.com/email.
I have to deal with a binary value of base64 ID in a groovy script. So, first I need to covert binary data to base64 format and then
Any clues/thoughts ? Thanks!!
This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.