Nmap Development mailing list archives

Re: [RFC] Lua bindings for OpenSSL md5 and sha1 hash functions


From: Sven Klemm <sven () c3d2 de>
Date: Sun, 03 Aug 2008 17:36:39 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

| I just added hash to NSE in the SVN. It does roughly the
| same, having hash.md5 and hash.sha1 to get hex strings
| and hash.md5bin and hash.sha1bin to get their binary
| equivalents.
|
| It binds to the md5 and sha1 functions which have been
| added to nbase recently, so they are independent of
| having openssl on your machine.

Ok I will use those when I need hashing.
I think openssl bindings are nevertheless useful because
of all the other functionality openssl offers.

| Regarding adding bin2hex to binlib (which has by now been
| merged into svn, too): the same behavior can be achieved
| using
| _, hexstring = bin.unpack("H" .. #binstring, binstring)

I am aware of that, unfortunately bin.unpack cannot be used directly
but you always need an intermediate variable. It would be really great
if there was some unpack_single (maybe with a better name) so I could
unpack just a single value and use it directly.

~  hexstring = bin.unpack_single("H" .. #binstring, binstring)


Cheers,
Sven


- --
Sven Klemm
http://cthulhu.c3d2.de/~sven/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiV0IcACgkQevlgTHEIT4YSxACfXykjmaKAO3avgUSkmEzUqDvQ
6M0An3dmMV2RQOkP0iIC89PqXtZYuhgl
=m4e+
-----END PGP SIGNATURE-----

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: