var md
=
Java.use(
'java.security.MessageDigest'
);
md.getInstance.overload(
'java.lang.String'
,
'java.lang.String'
).implementation
=
function (a,b) {
send(
"======================================"
);
send(
"算法名:"
+
a);
return
this.getInstance(a, b);
}
md.getInstance.overload(
'java.lang.String'
).implementation
=
function (a) {
send(
"======================================"
);
send(
"算法名:"
+
a);
return
this.getInstance(a);
}
md.update.overload(
'[B'
).implementation
=
function (a) {
send(
"======================================"
);
send(
"update:"
+
ByteToString(a))
return
this.update(a);
}
md.update.overload(
'[B'
,
'int'
,
'int'
).implementation
=
function (a,b,c) {
send(
"======================================"
);
send(
"update:"
+
ByteToString(a)
+
"|"
+
b
+
"|"
+
c);
return
this.update(a,b,c);
}
md.digest.overload().implementation
=
function () {
send(
"======================================"
);
var result
=
this.digest();
send(
"digest结果:"
+
BytesToHex(result));
/
/
console.log(
"digest结果:"
+
ByteToString(result));
return
result;
}
md.digest.overload(
'[B'
).implementation
=
function (a) {
send(
"======================================"
);
send(
"digest参数:"
+
ByteToString(a));
var result
=
this.digest(a);
send(
"digest结果:"
+
BytesToHex(result));
/
/
send(
"digest结果:"
+
ByteToString(result));
return
result;