Thanks very much Joe. With your code, I was able to link to libeay32.dll (precompiled with opensll). SHA256 is not one of the official interfaces. To boot, this is twice as fast as the MSFT interface.
sslp =: 'D:\OpenSSL-Win64\bin' NB.set path to your system OPENSSL =: sslp , '\libeay32.dll ' NB. should be interchangeable on linux/mac ??? ssl =: 1 : '(OPENSSL , m)&cd' sslsha256 =: ' SHA256 i *c l *c' ssl s256 =: 3 : 0 output=: (32) # ' ' sslsha256 (y);(# y);output output ) s256 hexhash 'The quick brown fox jumps over the lazy dog' d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592 s256 hexhash 'The quick brown fox jumps over the lazy dog.' ef537f25c895bfa782526529a9b63d97aa631564d5d789c2b765448c8635fb6c 100 ts 's256 ''The quick brown fox jumps over the lazy dog''' 105932/sec 0.005888MB ----- Original Message ----- From: Joe Bogner <joebog...@gmail.com> To: programm...@jsoftware.com Cc: Sent: Wednesday, February 26, 2014 7:16:44 AM Subject: Re: [Jprogramming] using dll's in wine (linux/mac) (also a windows implementation of hash functions) Hi Pascal, I updated my wiki page on Calling DLLs to include a linux example that uses SHA256 from openssl (with a shim) http://www.jsoftware.com/jwiki/JoeBogner/CallingDLL Hopefully it helps in case you want to go down that path On Tue, Feb 25, 2014 at 8:40 PM, Pascal Jasmin <godspiral2...@yahoo.ca>wrote: > I don't understand the openssl documentation, or found other dll > implementations (than an old delphi one) > > > ----- Original Message ----- > From: Joe Bogner <joebog...@gmail.com> > To: programm...@jsoftware.com > Cc: > Sent: Tuesday, February 25, 2014 8:24:04 PM > Subject: Re: [Jprogramming] using dll's in wine (linux/mac) (also a > windows implementation of hash functions) > > I'm not sure about wine either. Why not write a small helper library around > openssl or libcrypt functions? You could probably even mimic the same > function signature. > > > > On Tue, Feb 25, 2014 at 7:50 PM, Pascal Jasmin <godspiral2...@yahoo.ca > >wrote: > > > I've posted some hash functions sha1 sha2 and md5 that use Microsoft's > > advapi32.dll that comes with windows. Could someone let me know what/if > > changes are needed to work with wine? > > > > > > > http://www.jsoftware.com/jwiki/PascalJasmin/SHA%201%2C%202%20and%20MD5%20for%20windows > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm