The foundation for the internal standard library. (0.16.2)
This commit is contained in:
parent
71682293fe
commit
f0ed1d6761
13 changed files with 88 additions and 197 deletions
|
|
@ -277,6 +277,9 @@ fun md5_hex(hexStr)
|
|||
|
||||
// Class wrapper to avoid global name collisions and show class usage
|
||||
*/
|
||||
|
||||
#include <strings.fun>
|
||||
|
||||
class MD5()
|
||||
// MD5 constants (as fields)
|
||||
K = [
|
||||
|
|
@ -517,3 +520,8 @@ class MD5()
|
|||
bytes = this.from_hex(hexStr)
|
||||
digest = this.md5_bytes(bytes)
|
||||
return this.bytes_to_hex(digest)
|
||||
|
||||
fun md5_str(this, str)
|
||||
bytes = string_to_bytes_ascii(str)
|
||||
digest = this.md5_bytes(bytes)
|
||||
return this.bytes_to_hex(digest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue