/// <reference types="node" />
import { CipherGCMTypes } from 'crypto';
import { Block } from '@textile/threads-core';
export interface Options {
    codec: string;
    algo: string;
    cipher?: CipherGCMTypes;
}
export declare const defaultOptions: Options;
/**
 * EncodeBlock returns a node by encrypting the block's raw bytes with key.
 * @param block The IPLD block to encrypt and encode.
 * @param key A random key of 32 bytes tto use for encryption.
 * @param opts Options to control encoding and encryption.
 * Defaults to CBOR encoding with the SHA256 hash function, and AES GCM 256-bit encryption.
 */
export declare function encodeBlock(block: Block, key: Uint8Array, opts?: Options): Block<Buffer>;
/**
 * DecodeBlock uses key to perform AES-256 GCM decryption on ciphertext.
 * @param block Ciphertext as Block.
 * @param key Encryption key.
 * @param opts Additional decoding options.
 */
export declare function decodeBlock<T = any>(block: Block<Uint8Array>, key: Uint8Array, opts?: Options): Block<T>;
