on ‎2020 Aug 25 6:00 AM
Hello Experts,
We have a requirement to convert base64 value of a field and convert it into byte array format and pass it to target system. Could this be achieved through CPI interface ?
Regards,
Varun Vichare.
Request clarification before answering.
Hello Varun,
Yes this is possible and below is the snippet of groovy that does the same.
def s = 'Argh, Groovy you say, mate?'
String encoded = s.bytes.encodeBase64().toString()
assert 'QXJnaCwgR3Jvb3Z5IHlvdSBzYXksIG1hdGU/' == encoded
byte[] decoded = encoded.decodeBase64()
assert s == new String(decoded)
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.