import { IOAuth2Authorization } from '../models/Authorization.js';
/**
 * Checks if the URL has valid scheme for OAuth flow.
 *
 * Do not use this to validate redirect URIs as they can use any protocol.
 *
 * @param url The url value to test
 * @throws {TypeError} When passed value is not set, empty, or not a string
 * @throws {Error} When passed value is not a valid URL for OAuth 2 flow
 */
export declare function checkUrl(url: string): void;
/**
 * Checks if basic configuration of the OAuth 2 request is valid an can proceed
 * with authentication.
 * @param settings authorization settings
 * @throws {Error} When settings are not valid
 */
export declare function sanityCheck(settings: IOAuth2Authorization): void;
/**
 * Generates a random string of characters.
 *
 * @returns A random string.
 */
export declare function randomString(): string;
/**
 * Replaces `-` or `_` with camel case.
 * @param {string} name The string to process
 * @return {String|undefined} Camel cased string or `undefined` if not transformed.
 */
export declare function camel(name: string): string | undefined;
/**
 * Computes the SHA256 hash ogf the given input.
 * @param value The value to encode.
 */
export declare function sha256(value: string): Promise<ArrayBuffer>;
/**
 * Encoded the array buffer to a base64 string value.
 */
export declare function base64Buffer(buffer: ArrayBuffer): string;
/**
 * Generates code challenge for the PKCE extension to the OAuth2 specification.
 * @param verifier The generated code verifier.
 * @returns The code challenge string
 */
export declare function generateCodeChallenge(verifier: string): Promise<string>;
/**
 * Generates cryptographically significant random string.
 * @param size The size of the generated nonce.
 * @returns A nonce (number used once).
 */
export declare function nonceGenerator(size?: number): string;
//# sourceMappingURL=Utils.d.ts.map