in public/amazon-cognito-identity.js [3561:3592]
function bnToString(b) {
if (this.s < 0) return '-' + this.negate().toString();
var k;
if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else throw new Error('Only radix 2, 4, 8, 16, 32 are supported');
var km = (1 << k) - 1,
d,
m = false,
r = '',
i = this.t;
var p = this.DB - i * this.DB % k;
if (i-- > 0) {
if (p < this.DB && (d = this[i] >> p) > 0) {
m = true;
r = int2char(d);
}
while (i >= 0) {
if (p < k) {
d = (this[i] & (1 << p) - 1) << k - p;
d |= this[--i] >> (p += this.DB - k);
} else {
d = this[i] >> (p -= k) & km;
if (p <= 0) {
p += this.DB;
--i;
}
}
if (d > 0) m = true;
if (m) r += int2char(d);
}
}
return m ? r : '0';
}