--- a/src/rakudo-star-modules/Config-Parser-toml/META6.json
+++ b/src/rakudo-star-modules/Config-Parser-toml/META6.json
@@ -5,7 +5,7 @@
     "Patrick Spek <p.spek@tyil.work>"
   ],
   "depends": [
-    "Config::TOML:ver<0.1.1>:auth<atweiden>",
+    "Config::TOML:ver<0.1.2>:auth<atweiden>",
     "Config:ver<3.0.3>:auth<cpan:TYIL>"
   ],
   "description": "TOML parser for Config",
--- /dev/null
+++ b/src/rakudo-star-modules/Digest-MD5/META6.json
@@ -0,0 +1,18 @@
+{
+    "perl"        : "6.*",
+    "name"        : "Digest::MD5",
+    "version"     : "0.05",
+    "description" : "Perl6 port of Perl5' Digest::MD5 module",
+    "build-depends" : [ ],
+    "test-depends" : [
+        "Test"
+    ],
+    "depends" : [ ],
+    "provides" : {
+        "Digest::MD5" : "lib/Digest/MD5.pm"
+    },
+    "author"      : "Cosimo Streppone",
+    "authority"   : "cosimo",
+    "source-url"  : "git://github.com/cosimo/perl6-digest-md5.git"
+}
+
--- a/src/rakudo-star-modules/Digest-MD5/lib/Digest/MD5.pm
+++ b/src/rakudo-star-modules/Digest-MD5/lib/Digest/MD5.pm
@@ -3,33 +3,71 @@
 #
 
 class Digest::MD5:auth<cosimo>:ver<0.05> {
+    sub prefix:<¬>(\x)       {   (+^ x) % 2**32 }
+    sub infix:<⊞>(\x, \y)    {  (x + y) % 2**32 }
+    sub infix:«<<<»(\x, \n)  { (x +< n) % 2**32 +| (x +> (32-n)) }
 
-    # Use .pir, not .pbc!
-    # See https://trac.parrot.org/parrot/ticket/1694
-    pir::load_bytecode__vs('Digest/MD5.pir');
+    my \FGHI = -> \X, \Y, \Z { (X +& Y) +| (¬X +& Z) },
+               -> \X, \Y, \Z { (X +& Z) +| (Y +& ¬Z) },
+               -> \X, \Y, \Z { X +^ Y +^ Z           },
+               -> \X, \Y, \Z { Y +^ (X +| ¬Z)        };
 
-    multi method md5_hex (Str $str) {
+    my \S = (
+            (7, 12, 17, 22) xx 4,
+            (5,  9, 14, 20) xx 4,
+            (4, 11, 16, 23) xx 4,
+            (6, 10, 15, 21) xx 4,
+        ).flat;
 
-        my $md5_hex = Q:PIR {
-            .local pmc f, g, str
-            str = find_lex '$str'
-            f = get_root_global ['parrot'; 'Digest'], '_md5sum'
-            $S0 = repr_unbox_str str
-            $P1 = f($S0)
-            g = get_root_global ['parrot'; 'Digest'], '_md5_hex'
-            $S0 = g($P1)
-            %r =  perl6_box_str $S0
-        };
 
-        return $md5_hex;
+    my \T = (floor(abs(sin($_ + 1)) * 2**32) for ^64).flat;
+
+    my \k = (
+            (   $_           for ^16),
+            ((5*$_ + 1) % 16 for ^16),
+            ((3*$_ + 5) % 16 for ^16),
+            ((7*$_    ) % 16 for ^16),
+        ).flat;
+
+
+    sub little-endian($w, $n, *@v) { (@v X+> flat ($w X* ^$n)) X% (2 ** $w) }
+
+    sub md5-pad($msg) {
+        my \bits = 8 * $msg.elems;
+        my @padded = flat $msg.list, 0x80, 0x00 xx (-(bits div 8 + 1 + 8) % 64);
+        flat @padded.map({ :256[$^d,$^c,$^b,$^a] }), little-endian(32, 2, bits);
     }
 
-    multi method md5_hex (@str) {
+    sub md5-block(@H, @X) {
+        my ($A, $B, $C, $D) = @H;
+        for ^64 -> \i {
+            my \f = FGHI[i div 16]($B, $C, $D);
+              ($A, $B,                                         $C, $D)
+            = ($D, $B ⊞ (($A ⊞ f ⊞ T[i] ⊞ @X[k[i]]) <<< S[i]), $B, $C);
+        }
+        @H «⊞=» ($A, $B, $C, $D);
+    }
 
-        my $str = @str.join("");
-        my $md5_hex = self.md5_hex($str);
-        return $md5_hex;
+    our sub md5($msg) {
+        my @M = md5-pad($msg);
+        my @H = 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476;
+        md5-block(@H, @M[$_ .. $_+15]) for 0, 16 ...^ +@M;
+        Buf.new: little-endian(8, 4, @H)
+    }
 
+    multi method md5_hex(Str $str) {
+        md5( $str.encode('latin-1') ).list».fmt('%02x').join
     }
 
+    multi method md5_hex(@str) {
+        md5( @str.join.encode('latin-1') ).list».fmt('%02x').join
+    }
+
+    multi method md5_buf(Str $str --> Buf) {
+        md5( $str.encode('latin-1') );
+    }
+
+    multi method md5_buf(@str --> Buf) {
+        md5( @str.join.encode('latin-1') );
+    }
 }
