crypto: {
createCipheriv: {
(
algorithm: CipherCCMTypes,
key: CipherKey,
iv: BinaryLike,
options: CipherCCMOptions,
): CipherCCM;
(
algorithm: CipherOCBTypes,
key: CipherKey,
iv: BinaryLike,
options: CipherOCBOptions,
): CipherOCB;
(
algorithm: CipherGCMTypes,
key: CipherKey,
iv: BinaryLike,
options?: CipherGCMOptions,
): CipherGCM;
(
algorithm: "chacha20-poly1305",
key: CipherKey,
iv: BinaryLike,
options?: CipherChaCha20Poly1305Options,
): CipherChaCha20Poly1305;
(
algorithm: string,
key: CipherKey,
iv: null | BinaryLike,
options?: TransformOptions<Transform>,
): Cipheriv;
};
createDecipheriv: {
(
algorithm: CipherCCMTypes,
key: CipherKey,
iv: BinaryLike,
options: CipherCCMOptions,
): DecipherCCM;
(
algorithm: CipherOCBTypes,
key: CipherKey,
iv: BinaryLike,
options: CipherOCBOptions,
): DecipherOCB;
(
algorithm: CipherGCMTypes,
key: CipherKey,
iv: BinaryLike,
options?: CipherGCMOptions,
): DecipherGCM;
(
algorithm: "chacha20-poly1305",
key: CipherKey,
iv: BinaryLike,
options?: CipherChaCha20Poly1305Options,
): DecipherChaCha20Poly1305;
(
algorithm: string,
key: CipherKey,
iv: null | BinaryLike,
options?: TransformOptions<Transform>,
): Decipheriv;
};
createHash: (algorithm: string, options?: HashOptions) => Hash;
createHmac: (
algorithm: string,
key: BinaryLike | KeyObject,
options?: TransformOptions<Transform>,
) => Hmac;
randomBytes: {
(size: number): Buffer;
(size: number, callback: (err: null | Error, buf: Buffer) => void): void;
};
randomUUID: | (
(
options?: RandomUUIDOptions,
) => `${string}-${string}-${string}-${string}-${string}`
)
| (() => string);
} = ...
Type declaration
createCipheriv: {
(
algorithm: CipherCCMTypes,
key: CipherKey,
iv: BinaryLike,
options: CipherCCMOptions,
): CipherCCM;
(
algorithm: CipherOCBTypes,
key: CipherKey,
iv: BinaryLike,
options: CipherOCBOptions,
): CipherOCB;
(
algorithm: CipherGCMTypes,
key: CipherKey,
iv: BinaryLike,
options?: CipherGCMOptions,
): CipherGCM;
(
algorithm: "chacha20-poly1305",
key: CipherKey,
iv: BinaryLike,
options?: CipherChaCha20Poly1305Options,
): CipherChaCha20Poly1305;
(
algorithm: string,
key: CipherKey,
iv: null | BinaryLike,
options?: TransformOptions<Transform>,
): Cipheriv;
}
createDecipheriv: {
(
algorithm: CipherCCMTypes,
key: CipherKey,
iv: BinaryLike,
options: CipherCCMOptions,
): DecipherCCM;
(
algorithm: CipherOCBTypes,
key: CipherKey,
iv: BinaryLike,
options: CipherOCBOptions,
): DecipherOCB;
(
algorithm: CipherGCMTypes,
key: CipherKey,
iv: BinaryLike,
options?: CipherGCMOptions,
): DecipherGCM;
(
algorithm: "chacha20-poly1305",
key: CipherKey,
iv: BinaryLike,
options?: CipherChaCha20Poly1305Options,
): DecipherChaCha20Poly1305;
(
algorithm: string,
key: CipherKey,
iv: null | BinaryLike,
options?: TransformOptions<Transform>,
): Decipheriv;
}
createHash: (algorithm: string, options?: HashOptions) => Hash
createHmac: (
algorithm: string,
key: BinaryLike | KeyObject,
options?: TransformOptions<Transform>,
) => Hmac
randomBytes: {
(size: number): Buffer;
(size: number, callback: (err: null | Error, buf: Buffer) => void): void;
}
randomUUID:
| (
(
options?: RandomUUIDOptions,
) => `${string}-${string}-${string}-${string}-${string}`
)
| (() => string)