/** * crypto.subtle is not available on non-localhost http pages, which is pretty annoying for * testing OAuth2 PKCE flow in docker since we can't use localhost for container to container * communication. So here we provide a polyfill for sha256 - note that it only works with ascii * strings. */ export declare function sha256(str: string): Promise>; /** * This function is useful in the OAuth Authorization Code with PKCE flow * when you need to hash the code_verifier into a code_challenge * const code_verifier = nanoid(43) * const code_challenge = await sha256andbase64url(code_verifier) */ export declare function sha256andbase64url(str: string): Promise;