+ md5_transform_cl (w0, w1, w2, w3, digest);
+}
+
+void md5hmac_none(u8 const * const inData, const u32x pw_len, u8 outDigest[16])
+{
+ u32 pos;
+ u32 boundary;
+
+ boundary = pw_len;
+ if (boundary > 16) {
+ boundary = 16;
+ }
+
+ for (pos = 0; pos < boundary; pos++) {
+ outDigest[pos] = inData[pos];
+ }
+ for (pos = boundary; pos < 16; pos++) {
+ outDigest[pos] = 0;
+ }
+}
+
+void md5hmac_domain(u8 const * const inData, const u32x pw_len, u8 outDigest[16])
+{
+ u32 pos;
+
+ // data
+
+ u32x data_buf[16];
+
+ for (pos = 0; pos < pw_len; pos++) {
+ ((u8 *)data_buf)[pos] = inData[pos];
+ }
+ for (pos = pw_len; pos < 64; pos++) {
+ ((u8 *)data_buf)[pos] = 0;
+ }
+
+ // key
+
+ u32x key_buf[16];
+
+ for (pos = 0; pos < domain_len; pos++) {
+ ((u8 *)key_buf)[pos] = domain[pos];
+ }
+ for (pos = domain_len; pos < 64; pos++) {
+ ((u8 *)key_buf)[pos] = 0;
+ }
+
+ // pads
+
+ u32x ipad[4];
+ u32x opad[4];
+
+ hmac_md5_pad_cl (key_buf, key_buf + 4, key_buf + 8, key_buf + 12, ipad, opad);
+
+ // loop
+
+ append_0x80_2x4_VV (data_buf, data_buf + 4, pw_len);
+
+ data_buf[14] = (64 + pw_len) * 8;
+
+ hmac_md5_run_cl (data_buf, data_buf + 4, data_buf + 8, data_buf + 12, ipad, opad, (u32x *)outDigest);