Almroth.com
Home Software Projects Documents Links Photos Contact us

Adalibgcrypt

A thin binding (somewhat) to libgcrypt. This binding is using some Ada types to better cover the various types used by libgcrypt, but should still be considered as a thin binding.

It is a bit difficult to cover all types and uses of a library such as this one, so I have only provided definitions for C.Char_Array and C.Strings.Chars_Ptr for now in the binding. You will find a generic instantiation of C.Pointers called CAP in the package, which is used to work with C pointers to Char_Array buffers.

Feel free to add your own definitions to the package. I would appreciate though, that if you add definitions for commonly used types, that you forward them to me, so I can include them in the next update.

This binding is still work-in-progress. If you use it and encounter problems, please contact me, and I will update the binding.

I'm working on a a test program that right now covers everything except RSA and the hood algorithms. It is based on basic.c available in libgcrypt.

I'm working on Solaris 10 platform using GCC 3.4.2 and hence it is only tested so far on this platform. The binding should work on other platforms with no or minor changes (stdcall instead of C on Windows I suspect).

For more information on libgcrypt, please visit GnuPG home page.

Makefile
adagcrypt_p.ads
adagcrypt.adb





© 2005 Andreas Almroth