in src/mpin.js [133:186]
mpin_hash: function(sha, c, U) {
var t = [],
w = [],
h = [],
H, R, i;
c.geta().getA().toBytes(w);
for (i = 0; i < this.EFS; i++) {
t[i] = w[i];
}
c.geta().getB().toBytes(w);
for (i = this.EFS; i < 2 * this.EFS; i++) {
t[i] = w[i - this.EFS];
}
c.getb().getA().toBytes(w);
for (i = 2 * this.EFS; i < 3 * this.EFS; i++) {
t[i] = w[i - 2 * this.EFS];
}
c.getb().getB().toBytes(w);
for (i = 3 * this.EFS; i < 4 * this.EFS; i++) {
t[i] = w[i - 3 * this.EFS];
}
U.getX().toBytes(w);
for (i = 4 * this.EFS; i < 5 * this.EFS; i++) {
t[i] = w[i - 4 * this.EFS];
}
U.getY().toBytes(w);
for (i = 5 * this.EFS; i < 6 * this.EFS; i++) {
t[i] = w[i - 5 * this.EFS];
}
if (sha == this.SHA256) {
H = new ctx.HASH256();
} else if (sha == this.SHA384) {
H = new ctx.HASH384();
} else if (sha == this.SHA512) {
H = new ctx.HASH512();
}
H.process_array(t);
h = H.hash();
if (h.length == 0) {
return null;
}
R = [];
for (i = 0; i < ctx.ECP.AESKEY; i++) {
R[i] = h[i];
}
return R;
},