@aws-amplify/auth
Version:
Auth category of aws-amplify
22 lines (19 loc) • 637 B
JavaScript
import { computeModPow } from '@aws-amplify/react-native';
import BigInteger from './BigInteger.mjs';
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
BigInteger.prototype.modPow = function modPow(e, m, callback) {
computeModPow({
base: this.toString(16),
exponent: e.toString(16),
divisor: m.toString(16),
})
.then((result) => {
callback(null, new BigInteger(result, 16));
})
.catch((error) => {
callback(new Error(error), null);
});
};
export { BigInteger };
//# sourceMappingURL=index.native.mjs.map