lib/md5: improve doc
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 19 Aug 2015 18:46:47 +0000 (14:46 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 20 Aug 2015 01:18:25 +0000 (21:18 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/md5.nit

index cd6bcd4..6495145 100644 (file)
@@ -490,8 +490,13 @@ in "C Header" `{
 `}
 
 redef class String
-       # returns the md5 digest of the receiver string
-       # algorithm implemented by L. Peter Deutsch <ghost@aladdin.com>
+       # MD5 digest of `self`
+       #
+       # ~~~
+       # assert "".md5 == "d41d8cd98f00b204e9800998ecf8427e"
+       # assert "a".md5 == "0cc175b9c0f1b6a831c399e269772661"
+       # assert "abc".md5 == "900150983cd24fb0d6963f7d28e17f72"
+       # ~~~
        fun md5: String do return to_cstring.native_md5.to_s
 end