import * as pkcs11 from "pkcs11js"; import * as core from "../core"; import * as mech from "../mech"; import { Session } from "../session"; import * as types from "../types"; /** * Represents digest operation */ export declare class Digest extends core.BaseObject { /** * Session */ session: Session; /** * Creates a new instance of {@link Digest} * @param session Session * @param alg The digesting mechanism * @param lib PKCS#11 library */ constructor(session: Session, alg: mech.MechanismType, lib: pkcs11.PKCS11); /** * Continues a multiple-part message-digesting operation operation * @param data Data for digest computing */ update(data: types.CryptoData): void; /** * Finishes a multiple-part message-digesting operation * @returns Computed digest value */ final(): Buffer; /** * Digests data in a single part * @param data Data for digest computing * @returns Computed digest value */ once(data: types.CryptoData): Buffer; /** * Digests data in a single part * @param data Data for digest computing * @param cb Async callback function with computed digest value */ once(data: types.CryptoData, cb: (error: Error, data: Buffer) => void): void; /** * Initializes a message-digesting operation * @param alg The digesting mechanism */ protected init(alg: mech.MechanismType): void; }