This commit is contained in:
Reid 2023-09-04 03:18:40 -07:00
parent ef0e48e673
commit 9ecb8b4ae8
Signed by: reidlab
GPG key ID: 6C9EAA3364F962C8

View file

@ -24,7 +24,7 @@ pub fn get_gjp2(password: String) -> String {
} }
pub fn decode_gjp(gjp: String) -> String { pub fn decode_gjp(gjp: String) -> String {
let base64_decoded = String::from_utf8(general_purpose::STANDARD_NO_PAD.decode(gjp).expect("couldn't decode base64")).expect("invalid UTF-8 sequence (how)"); let base64_decoded = String::from_utf8(general_purpose::STANDARD.decode(gjp).expect("couldn't decode base64")).expect("invalid UTF-8 sequence (how)");
let xor_decoded = cyclic_xor_string(&base64_decoded, "37526"); let xor_decoded = cyclic_xor_string(&base64_decoded, "37526");
return xor_decoded return xor_decoded
} }