Skip to content

Instantly share code, notes, and snippets.

@sparre
Created May 9, 2016 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sparre/13021e656c42f2c2efc34cce8427c55a to your computer and use it in GitHub Desktop.
Save sparre/13021e656c42f2c2efc34cce8427c55a to your computer and use it in GitHub Desktop.
with Ada.Text_IO;
with Crypto.Types.Base64;
procedure Experiment is
package Boolean64 is new Crypto.Types.Base64 (Boolean);
Some_Data : constant Crypto.Types.Bytes := (0, 12, 24, 48, 96, 192, 65, 65, 65);
use Ada.Text_IO;
begin
for Element of Boolean64.Encode_Base64 (Some_Data) loop
Put_Line (Boolean'Image (Element));
end loop;
end Experiment;
@sparre
Copy link
Author

sparre commented May 9, 2016

Drop the file in the same directory as crypto-types-base64.ads, compile with gnatmake -O3 experiment, and run ./experiment...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment