import { BaseAuthRequest } from "../request/BaseAuthRequest"; import { ShrOptions, SignedHttpRequest } from "./SignedHttpRequest"; /** * The PkceCodes type describes the structure * of objects that contain PKCE code * challenge and verifier pairs */ export type PkceCodes = { verifier: string; challenge: string; }; export type SignedHttpRequestParameters = Pick & { correlationId?: string; }; /** * Interface for crypto functions used by library */ export interface ICrypto { /** * Creates a guid randomly. */ createNewGuid(): string; /** * base64 Encode string * @param input */ base64Encode(input: string): string; /** * base64 decode string * @param input */ base64Decode(input: string): string; /** * Generates an JWK RSA S256 Thumbprint * @param request */ getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise; /** * Removes cryptographic keypair from key store matching the keyId passed in * @param kid */ removeTokenBindingKey(kid: string): Promise; /** * Removes all cryptographic keys from IndexedDB storage */ clearKeystore(): Promise; /** * Returns a signed proof-of-possession token with a given acces token that contains a cnf claim with the required kid. * @param accessToken */ signJwt(payload: SignedHttpRequest, kid: string, shrOptions?: ShrOptions, correlationId?: string): Promise; /** * Returns the SHA-256 hash of an input string * @param plainText */ hashString(plainText: string): Promise; } export declare const DEFAULT_CRYPTO_IMPLEMENTATION: ICrypto; //# sourceMappingURL=ICrypto.d.ts.map