Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udate dependencies and make examples work #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tyrchen
Copy link

@tyrchen tyrchen commented Nov 15, 2019

It looks existing code cannot be compiled with rust 1.39. I tried to make it work and also updated dependencies to their latest version as much as possible.

It took me a while to make all the examples work. I might be wrong - however, I found that remove_ascii_armor may have two problems that I commented below.

Not sure if the coding style follows your standard, after all the changes I run cargo fmt against the whole codebase.

The code works with my own updates to the bpb, which I'd send a PR once this is accepted.

if !cksum_line.starts_with("=") || !cksum_line.len() > 1 {
return Err(InvalidAsciiArmor)

if !cksum_line.starts_with("=") || !(cksum_line.len() > 1) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we need a () here for cksum_line.len() > 1

}
let mut cksum = [0; 4];
base64::decode_config_slice(&cksum_line[1..], base64::STANDARD, &mut cksum[..])?;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially, I can't get this work against examples/props/sig.txt. After comparing the cksum buffers I found that this code gives [184, 23, 112, 0], while the correct one should be [0, 184, 23, 112].

indirect pushed a commit to indirect/pbp that referenced this pull request Jan 26, 2021
…p-to-date

udate dependencies and make examples work
This was referenced Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant