udate dependencies and make examples work#1
Open
tyrchen wants to merge 1 commit intowithoutboats:masterfrom
Open
udate dependencies and make examples work#1tyrchen wants to merge 1 commit intowithoutboats:masterfrom
tyrchen wants to merge 1 commit intowithoutboats:masterfrom
Conversation
tyrchen
commented
Nov 15, 2019
| if !cksum_line.starts_with("=") || !cksum_line.len() > 1 { | ||
| return Err(InvalidAsciiArmor) | ||
|
|
||
| if !cksum_line.starts_with("=") || !(cksum_line.len() > 1) { |
Author
There was a problem hiding this comment.
looks like we need a () here for cksum_line.len() > 1
tyrchen
commented
Nov 15, 2019
| return Err(InvalidAsciiArmor); | ||
| } | ||
| let mut cksum = [0; 4]; | ||
| base64::decode_config_slice(&cksum_line[1..], base64::STANDARD, &mut cksum[..])?; |
Author
There was a problem hiding this comment.
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
Closed
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_armormay have two problems that I commented below.Not sure if the coding style follows your standard, after all the changes I run
cargo fmtagainst the whole codebase.The code works with my own updates to the bpb, which I'd send a PR once this is accepted.