import * as pkcs11 from "pkcs11js"; import * as core from "../core"; import { MechanismType } from "../mech"; import { Session } from "../session"; import { Key } from '../objects'; import * as types from '../types'; /** * Represents verifying operation */ export declare class Verify extends core.BaseObject { /** * Session */ session: Session; /** * Create a new instance of verifying operation * @param session Session * @param alg The verifying mechanism * @param key The verifying key * @param lib PKCS#11 library */ constructor(session: Session, alg: MechanismType, key: Key, lib: pkcs11.PKCS11); /** * Continues a multiple-part verification operation * @param data The signed data */ update(data: types.CryptoData): void; /** * Finishes a multiple-part verification operation, checking the signature * @param signature Th signature value * @returns `true` if signature is valid, otherwise `false` */ final(signature: Buffer): boolean; /** * Verifies a signature in a single-part operation * @param data The signed data * @param signature The signature value * @returns `true` if signature is valid, otherwise `false` */ once(data: types.CryptoData, signature: Buffer): boolean; /** * * Verifies a signature in a single-part operation * @param data The signed data * @param signature The signature value * @param cb Async callback function with boolean result of checking. `true` if signature is valid, otherwise `false` */ once(data: types.CryptoData, signature: Buffer, cb: (error: Error | null, valid: boolean) => void): void; /** * initializes a verification operation * @param alg The verifying mechanism * @param key The verifying key */ protected init(alg: MechanismType, key: Key): void; }