// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.// Copyright 2017 Calvin Metcalf. All rights reserved. MIT license. import{BN}from"../bn.js/bn.js";import{Buffer}from"../../../buffer.ts"; exportfunctionwithPublic(paddedMsg, key){returnBuffer.from( paddedMsg.toRed(BN.mont(key.modulus)).redPow(newBN(key.publicExponent)).fromRed().toArray(),);}