/// <reference types="node" />
import { Crypto } from '@peculiar/webcrypto';
import { Buffer } from 'buffer';
import type { AnyLink } from './types';
export declare function getCrypto(): Crypto | null;
export declare function randomBytes(size: number): Buffer;
declare const encode: ({ iv, bytes }: {
    iv: Uint8Array;
    bytes: Uint8Array;
}) => Uint8Array;
declare const decode: (bytes: Uint8Array) => {
    iv: Uint8Array;
    bytes: Uint8Array;
};
declare const code: number;
declare const decrypt: ({ key, value }: {
    key: ArrayBuffer;
    value: {
        bytes: Uint8Array;
        iv: Uint8Array;
    };
}) => Promise<{
    cid: AnyLink;
    bytes: Uint8Array;
}>;
declare const encrypt: ({ key, cid, bytes }: {
    key: ArrayBuffer;
    cid: AnyLink;
    bytes: Uint8Array;
}) => Promise<{
    value: {
        bytes: Uint8Array;
        iv: Buffer;
    };
}>;
declare const cryptoFn: (key: Uint8Array) => {
    encrypt: (opts: any) => Promise<{
        value: {
            bytes: Uint8Array;
            iv: Buffer;
        };
    }>;
    decrypt: (opts: any) => Promise<{
        cid: AnyLink;
        bytes: Uint8Array;
    }>;
};
declare const name = "jchris@encrypted-block:aes-gcm";
export { encode, decode, code, name, encrypt, decrypt, cryptoFn as crypto };
