export declare function timeSafeCompare(a: string | Uint8Array, b: string | Uint8Array): Promise; export default timeSafeCompare; /** * Serialize data into a cookie header. * * Serialize the a name value pair into a cookie string suitable for * http headers. An optional options object specified cookie parameters. * * serialize('foo', 'bar', { httpOnly: true }) * => "foo=bar; httpOnly" * * @param {string} name * @param {string} val * @param {object} [opts] * @return {string} */ export declare function serializeCookie(name: string, val: string, opts?: Partial<{ encode: (string: any) => string; maxAge: any; domain: any; path: any; expires: any; httpOnly: boolean; secure: any; partitioned: any; priority: any; sameSite: any; }>): string; export type CookieEnv = Partial<{ COOKIE_HTTPONLY: string; COOKIE_SECURE: string; COOKIE_SAMESITE: string; COOKIE_MAX_AGE_SPAN: string; COOKIE_DOMAIN: string; COOKIE_PATH: string; }>; /** * Builds an option object to be used by the cookie serializer. * All options have defaults which can be edited using environment variables. * * Environment variables available: * - `env.COOKIE_HTTPONLY`: * Specifies if the cookie should have the `HttpOnly` attribute. * Set to "0" to remove this attribute from the cookie definition. * - `env.COOKIE_SECURE`: * Specifies if the cookie should have the `Secure` attribute. * Set to "0" to remove this attribute from the cookie definition. * - `env.COOKIE_SAMESITE`: * Will specify the value for the `SameSite` attribute for the cookie. * Can be "Strict", "None" or "Lax" (default). * - `env.COOKIE_MAX_AGE_SPAN`: * Specifies, in second, how long the cookie should be valid for. * Defaults to 7 days. * - `env.COOKIE_DOMAIN`: * If set, will specify a value for the `Domain` attribute for the cookie. * - `env.COOKIE_PATH`: * If set, will specify a value for the `Path` attribute for the cookie. * Defaults to `/`. * * @returns {object} - Options object for `cookie.serialize` * @private */ export declare function getCookieOptions(env?: CookieEnv): Partial<{ httpOnly: any; secure: any; sameSite: any; maxAge: any; path: any; domain: any; }>; //# sourceMappingURL=util.d.ts.map