On Mar 20, 2016 8:14 PM, Michael Van Canneyt <[email protected]> wrote: > > > > On Sun, 20 Mar 2016, Garry Wood wrote: > > >> I'm trying to write a sha256 implementation in pure pascal like sha1 and > >> md5 units. > >> With negative results. > >> Someone can helpme with this? > > > > I recently ported the implementation from LibTimCrypt / wpa_supplicant > > (which are both from public domain implementations), you can find the unit > > here: > > > > https://github.com/ultibohub/Core/blob/master/source/rtl/ultibo/core/crypto.pas > > > > This is for our Ultibo embedded project but the code is pure pascal and > > should compile for any platform if you adjust the uses clause. > > > > This has been validated against a number of test vectors available from > > different sources and seems correct although I can’t test on big endian CPU > > at present. The unit also includes ports of AES, DES, DES3 and RC4 ciphers > > as well as MD5 and SHA1. > > Would it be OK to extract some of the routines and include them in Free Pascal > using the usual license ? We have several of these routines, but not all, it > would be nice to have a more complete set available by default. > > Michael.
Yes, no problem. The original sources are credited to public domain implementation and the Ultibo license is identical to the FPC RTL. Cheers, Garry. _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
