UNPKG

imba

Version:

Intuitive and powerful language for building webapps that fly

10 lines (9 loc) 248 B
import BN from "../bn.js"; function withPublic(paddedMsg, key) { return Buffer.from(paddedMsg .toRed(BN.mont(key.modulus)) .redPow(new BN(key.publicExponent)) .fromRed() .toArray()); } export default withPublic;