interface CryptoFactory {
    asymmetricDecrypt: ((buffer: Buffer, privateKey: PrivateKey) => Buffer);
    asymmetricEncrypt: ((buffer: Buffer, publicKey: KeyObject) => Buffer);
    asymmetricEncryptionAlgorithm: string;
    asymmetricSign: ((buffer: Buffer, privateKey: PrivateKey) => Buffer);
    asymmetricSignatureAlgorithm: string;
    asymmetricVerify: ((buffer: Buffer, signature: Buffer, certificate: Buffer) => boolean);
    asymmetricVerifyChunk: ((self: CryptoFactory, chunk: Buffer, certificate: Buffer) => {
        signatureIsOK: boolean;
        signatureLength: number;
    });
    blockPaddingSize: number;
    derivedEncryptionKeyLength: number;
    derivedSignatureKeyLength: number;
    encryptingBlockSize: number;
    maximumAsymmetricKeyLength: number;
    minimumAsymmetricKeyLength: number;
    securityPolicy: SecurityPolicy;
    sha1or256: "SHA1" | "SHA256";
    signatureLength: number;
    symmetricEncryptionAlgorithm: "aes-256-cbc" | "aes-128-cbc";
    symmetricKeyLength: number;
}

Properties

asymmetricDecrypt: ((buffer: Buffer, privateKey: PrivateKey) => Buffer)
asymmetricEncrypt: ((buffer: Buffer, publicKey: KeyObject) => Buffer)
asymmetricEncryptionAlgorithm: string

for info only

asymmetricSign: ((buffer: Buffer, privateKey: PrivateKey) => Buffer)
asymmetricSignatureAlgorithm: string

for info only

asymmetricVerify: ((buffer: Buffer, signature: Buffer, certificate: Buffer) => boolean)
asymmetricVerifyChunk: ((self: CryptoFactory, chunk: Buffer, certificate: Buffer) => {
    signatureIsOK: boolean;
    signatureLength: number;
})
blockPaddingSize: number
derivedEncryptionKeyLength: number
derivedSignatureKeyLength: number
encryptingBlockSize: number
maximumAsymmetricKeyLength: number

for info only

minimumAsymmetricKeyLength: number

for info only

securityPolicy: SecurityPolicy
sha1or256: "SHA1" | "SHA256"
signatureLength: number
symmetricEncryptionAlgorithm: "aes-256-cbc" | "aes-128-cbc"
symmetricKeyLength: number