<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Base64 to byte array conversion in CPI in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/base64-to-byte-array-conversion-in-cpi/qaa-p/12258002#M4590928</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please keep in mind that if you are moving data over any protocol that expects text, then Base64 &lt;EM&gt;is&lt;/EM&gt; the way to move binary data. Sending binary where text is expected is a recipe for problems.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Morten&lt;/P&gt;</description>
    <pubDate>Tue, 25 Aug 2020 10:52:54 GMT</pubDate>
    <dc:creator>MortenWittrock</dc:creator>
    <dc:date>2020-08-25T10:52:54Z</dc:date>
    <item>
      <title>Base64 to byte array conversion in CPI</title>
      <link>https://community.sap.com/t5/technology-q-a/base64-to-byte-array-conversion-in-cpi/qaq-p/12258000</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
  &lt;P&gt;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 ?&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Varun Vichare.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 05:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/base64-to-byte-array-conversion-in-cpi/qaq-p/12258000</guid>
      <dc:creator>former_member105339</dc:creator>
      <dc:date>2020-08-25T05:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 to byte array conversion in CPI</title>
      <link>https://community.sap.com/t5/technology-q-a/base64-to-byte-array-conversion-in-cpi/qaa-p/12258001#M4590927</link>
      <description>&lt;P&gt;Hello Varun,&lt;/P&gt;&lt;P&gt;Yes this is possible and below is the snippet of groovy that does the same.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Sriprasad Shivaram Bhat&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 05:32:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/base64-to-byte-array-conversion-in-cpi/qaa-p/12258001#M4590927</guid>
      <dc:creator>Sriprasadsbhat</dc:creator>
      <dc:date>2020-08-25T05:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 to byte array conversion in CPI</title>
      <link>https://community.sap.com/t5/technology-q-a/base64-to-byte-array-conversion-in-cpi/qaa-p/12258002#M4590928</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please keep in mind that if you are moving data over any protocol that expects text, then Base64 &lt;EM&gt;is&lt;/EM&gt; the way to move binary data. Sending binary where text is expected is a recipe for problems.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Morten&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 10:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/base64-to-byte-array-conversion-in-cpi/qaa-p/12258002#M4590928</guid>
      <dc:creator>MortenWittrock</dc:creator>
      <dc:date>2020-08-25T10:52:54Z</dc:date>
    </item>
  </channel>
</rss>

