import { Base64 } from "../Base64"; import { Algorithm as SignerAlgorithm } from "./Algorithm"; import { Base } from "./Base"; import { Hash as SignerHash } from "./Hash"; import { Rsa } from "./Rsa"; export type Signer = Base; export declare namespace Signer { type Algorithm = SignerAlgorithm; namespace Algorithm { const is: typeof SignerAlgorithm.is; } type Hash = SignerHash; namespace Hash { const is: typeof SignerHash.is; } function generate(algorithm: "RSA" | "RSA-PSS", hash: SignerHash, length: 1024 | 2048 | 4096): Rsa; function create(algorithm: "None"): Signer; function create(algorithm: "HMAC", hash: SignerHash, key: Base64 | Uint8Array): Signer; function create(algorithm: "RSA", hash: SignerHash, publicKey: Base64 | Uint8Array): Rsa; function create(algorithm: "RSA-PSS", hash: SignerHash, publicKey: Base64 | Uint8Array): Rsa; function create(algorithm: "ECDSA", hash: SignerHash, publicKey: Base64 | Uint8Array): Signer; function create(algorithm: "RSA", hash: SignerHash, publicKey: Base64 | Uint8Array | undefined, privateKey: Base64 | Uint8Array | undefined): Rsa; function create(algorithm: "RSA-PSS", hash: SignerHash, publicKey: Base64 | Uint8Array | undefined, privateKey: Base64 | Uint8Array | undefined): Rsa; function create(algorithm: "ECDSA", hash: SignerHash, publicKey: Base64 | Uint8Array | undefined, privateKey: Base64 | Uint8Array | undefined): Signer; }