95aaa82003-12-03Martin Nilsson #pike __REAL_VERSION__
59bfa12005-01-23Martin Nilsson #pragma strict_types
e1fb092014-02-14Martin Nilsson #require constant(Nettle.MD5)
95aaa82003-12-03Martin Nilsson 
af10832003-12-03Martin Nilsson //! MD5 is a message digest function constructed by Ronald Rivest, and
dc93732015-08-22Martin Nilsson //! is described in @rfc{1321@}. It outputs message digests of 128 //! bits, or 16 octets.
a164de2003-12-03Martin Nilsson 
86a7272013-10-05Henrik Grubbström (Grubba) inherit Nettle.MD5;
a164de2003-12-03Martin Nilsson 
4146ae2014-06-27Martin Nilsson Standards.ASN1.Types.Identifier pkcs_hash_id()
c0f3f52013-11-21Martin Nilsson { return Standards.PKCS.Identifiers.md5_id; }
05b49b2004-02-02Martin Nilsson 
a517762013-03-08Henrik Grubbström (Grubba) //! This is a convenience alias for @[Nettle.crypt_md5()], //! that uses the same API as the other hashes. //! //! @note //! The @[rounds] parameter is currently ignored. //! For forward compatibility, either leave out, //! or specify as @expr{1000@}. //! //! @seealso
86a7272013-10-05Henrik Grubbström (Grubba) //! @[Nettle.Hash()->crypt_hash()], @[crypt_md5()]
387ff92013-12-19Martin Nilsson string(7bit) crypt_hash(string(8bit) password, string(7bit) salt, int|void rounds)
a517762013-03-08Henrik Grubbström (Grubba) {
c5ada72018-01-24Henrik Grubbström (Grubba)  string(8bit) orig_password = password; password = "censored"; return Nettle.crypt_md5(orig_password, salt);
a517762013-03-08Henrik Grubbström (Grubba) }