Skip to content

Commit

Permalink
fix(windows): fix issues in windows (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive authored Aug 21, 2024
1 parent 14dfa4e commit 76297d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ fn parse_xml_keyfile(xml: &[u8]) -> Result<KeyElement, DatabaseKeyError> {
if key_version == Some("2.0".to_string()) {
// TODO we should also validate the integrity of a v2 keyfile using the hash value

let trimmed_key = key_value.trim().replace(" ", "").replace("\n", "");
let trimmed_key = key_value
.trim()
.replace(" ", "")
.replace("\n", "")
.replace("\r", "");

return if let Ok(key) = hex::decode(&trimmed_key) {
Ok(key)
Expand Down

0 comments on commit 76297d2

Please sign in to comment.