import { CryptoPrimitives } from './CryptoPrimitives';
import { HMACUtils } from './HMACUtils';
import { ShamirClass } from './shamir';
import { AESUtils } from './AES';
import { RSAUtils } from './RSA';
/**
 * Allows to use the expo-kryptom module as crypto primitives. This is necessary when building expo (react native) apps.
 */
export declare class NativeCryptoPrimitivesBridge implements CryptoPrimitives {
    constructor(expoKryptomModule: {
        Aes: AesService;
        Rsa: RsaService;
        Hmac: HmacService;
        StrongRandom: StrongRandomService;
        Digest: DigestService;
    });
    readonly AES: AESUtils;
    readonly HMAC: HMACUtils;
    readonly RSA: RSAUtils;
    readonly shamir: ShamirClass;
    private readonly strongRandom;
    private readonly digest;
    randomBytes(n: number): Uint8Array;
    randomUuid(): string;
    sha256(data: ArrayBuffer | Uint8Array): Promise<ArrayBuffer>;
    sha512(data: ArrayBuffer | Uint8Array): Promise<ArrayBuffer>;
}
declare enum AesAlgorithm {
    AesCbcPkcs7 = "AesCbcPkcs7"
}
declare enum RsaEncryptionAlgorithm {
    OaepWithSha1 = "OaepWithSha1",
    OaepWithSha256 = "OaepWithSha256"
}
declare enum RsaSignatureAlgorithm {
    PssWithSha256 = "PssWithSha256"
}
type RsaAlgorithm = RsaEncryptionAlgorithm | RsaSignatureAlgorithm;
declare enum HmacAlgorithm {
    HmacSha512 = "HmacSha512"
}
interface HmacKey {
    algorithmIdentifier: HmacAlgorithm;
}
interface AesKey {
    algorithmIdentifier: AesAlgorithm;
}
interface RsaKeyPair {
    algorithmIdentifier: RsaAlgorithm;
}
interface RsaPrivateKey {
    algorithmIdentifier: RsaAlgorithm;
}
interface RsaPublicKey {
    algorithmIdentifier: RsaAlgorithm;
}
type PrivateRsaKeyJwk = {
    alg: string;
    d: string;
    dp: string;
    dq: string;
    e: string;
    ext: boolean;
    key_ops: string[];
    n: string;
    p: string;
    q: string;
    qi: string;
};
type PublicRsaKeyJwk = {
    alg: string;
    e: string;
    ext: boolean;
    key_ops: string[];
    n: string;
};
interface AesService {
    generateKey(algorithmIdentifier: AesAlgorithm, size: number): Promise<AesKey>;
    encrypt(data: Uint8Array, key: AesKey, iv: Uint8Array | null): Promise<Uint8Array>;
    decrypt(ivAndEncryptedData: Uint8Array, key: AesKey): Promise<Uint8Array>;
    exportRawKey(key: AesKey): Promise<Uint8Array>;
    importRawKey(rawKey: Uint8Array, algorithmIdentifier: AesAlgorithm): Promise<AesKey>;
}
interface RsaService {
    generateKey(algorithmIdentifier: RsaAlgorithm, size: number): Promise<RsaKeyPair>;
    encrypt(data: Uint8Array, key: RsaPublicKey): Promise<Uint8Array>;
    decrypt(data: Uint8Array, key: RsaPrivateKey): Promise<Uint8Array>;
    signature(data: Uint8Array, key: RsaPrivateKey): Promise<Uint8Array>;
    verify(signature: Uint8Array, data: Uint8Array, key: RsaPublicKey): Promise<boolean>;
    exportPrivateKeyPkcs8(key: RsaPrivateKey): Promise<Uint8Array>;
    exportPrivateKeyJwk(key: RsaPrivateKey): Promise<PrivateRsaKeyJwk>;
    exportPublicKeySpki(key: RsaPublicKey): Promise<Uint8Array>;
    exportPublicKeyJwk(key: RsaPublicKey): Promise<PublicRsaKeyJwk>;
    importPrivateKeyPkcs8(privateKeyPkcs8: Uint8Array, algorithmIdentifier: RsaAlgorithm): Promise<RsaPrivateKey>;
    importPrivateKeyJwk(privateKey: PrivateRsaKeyJwk, algorithmIdentifier: RsaAlgorithm): Promise<RsaPrivateKey>;
    importPublicKeySpki(publicKeySpki: Uint8Array, algorithmIdentifier: RsaAlgorithm): Promise<RsaPublicKey>;
    importPublicKeyJwk(publicKey: PublicRsaKeyJwk, algorithmIdentifier: RsaAlgorithm): Promise<RsaPublicKey>;
    importKeyPair(privateKeyPkcs8: Uint8Array, algorithmIdentifier: RsaAlgorithm): Promise<RsaKeyPair>;
}
interface HmacService {
    generateKey(algorithmIdentifier: HmacAlgorithm): Promise<HmacKey>;
    sign(data: Uint8Array, key: HmacKey): Promise<Uint8Array>;
    verify(signature: Uint8Array, data: Uint8Array, key: HmacKey): Promise<boolean>;
    exportRawKey(key: HmacKey): Promise<Uint8Array>;
    importRawKey(rawKey: Uint8Array, algorithmIdentifier: HmacAlgorithm): Promise<HmacKey>;
}
interface StrongRandomService {
    randomBytes(length: number): Uint8Array;
    randomUUID(): string;
}
interface DigestService {
    sha256(data: Uint8Array): Promise<Uint8Array>;
}
export {};
