import { Algorithm } from "../types.js"; import Key from "./internal/key.js"; import forge from "node-forge"; export default class PublicKey extends Key { private readonly _parsedPublicKey; constructor(source: string); /** * Verify the signature of some data * * @param data - Input data * @param signature - Target signature * @param algorithm - Algorithm to be used */ verify(data: string, signature: string, algorithm?: Algorithm): boolean; /** * Run a Callable function with this public key opened * * @param callableFunction - Function to call and inject content */ callOnPublicKey(callableFunction: (pbk: forge.pki.rsa.PublicKey) => T): T; /** * * @param callableFunction - Function to call and inject content * @param _publicKeyContents - PublicKey content * * @throws Error when Cannot open public key */ private static callOnPublicKeyWithContents; }