Base64 encode data: Difference between revisions

Content added Content deleted
(Ada using AWS added)
Line 3: Line 3:


See also [[Base64 decode data]].
See also [[Base64 decode data]].

=={{header|Ada}}==

<lang Ada>with Ada.Text_IO;

with AWS.Response;
with AWS.Client;
with AWS.Translator;

procedure Encode_AWS is
URL : constant String := "http://rosettacode.org/favicon.ico";
Page : constant AWS.Response.Data := AWS.Client.Get (URL);
Payload : constant String := AWS.Response.Message_Body (Page);
Icon_64 : constant String := AWS.Translator.Base64_Encode (Payload);
begin
Ada.Text_IO.Put_Line (Icon_64);
end Encode_AWS;</lang>

{{out}}
<pre>
AAABAAIAEBAAAAAAAABoBQAAJgAAACAgAAAAAAAAqAgAAI4FAAAoAAAAEAAAACAAAAABAAgAAAAAAEABAAAAAAAAAAAAAAAAAAAA
...
AAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAE=
</pre>



=={{header|ABAP}}==
=={{header|ABAP}}==