/** * Given a key and message, generate a fernet token. * * @param crypto The web-crypto api. Either window.crypto or require("node-webcrypto-ossl"). * @param secret A base64 encoded fernet key (https://github.com/fernet/spec/blob/master/Spec.md#key-format) * @param now The current timestamp encoded as an ISO8601 time string * @param iv The IV to use, represented as a 16 byte Uint8Array * @param src The string to encode */ export declare function generate(crypto: Crypto, secret: string, now: string, iv: Uint8Array, src: string): Promise; /** * Given a key and token, verify that the token is valid and recover the original message. * * @param crypto The web-crypto api. Either window.crypto or require("node-webcrypto-ossl"). * @param secret A base64 encoded fernet key (https://github.com/fernet/spec/blob/master/Spec.md#key-format) * @param encodedToken A fernet token * @param ttl The time-to-live; if set, the token must be less than ttl seconds old otherwise it won't be decoded */ export declare function verify(crypto: Crypto, secret: string, encodedToken: string, ttl?: number): Promise;