+fn read_key() -> String {
+ use url::percent_encoding::percent_decode;
+ let mut key = String::new();
+ File::open(consts::FILE_KEY)
+ .expect(&format!("Failed to open key file: {}", consts::FILE_KEY))
+ .read_to_string(&mut key)
+ .expect(&format!("Failed to read key file: {}", consts::FILE_KEY));
+
+ String::from(
+ percent_decode(key.as_bytes())
+ .decode_utf8()
+ .expect(&format!("Failed to decode key file: {}", consts::FILE_KEY))
+ )
+}
+