[][src]Function ectoken::decrypt_v3

pub fn decrypt_v3(key: &str, token: &str) -> Result<String, DecryptionError>

Decrypts the given token using the supplied key. On success, returns the decrypted content. If the token is invalid or can not be decrypted, returns DecryptionError.

let decrypted = ectoken::decrypt_v3("testkey123", "bs4W7wyy0OjyBQMhAaahSVo2sG4gKEzuOegBf9kI-ZzG8Gz4FQuFud2ndvmuXkReeRnKFYXTJ7q5ynniGw").unwrap();

assert_eq!("ec_expire=1257642471&ec_secure=33", decrypted);