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

pem-rfc7468: revamp encapsulated length calculation functions #619

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

tarcieri
Copy link
Member

Estimates upper bound of the length of encoded line-wrapped Base64 with a specified customizable line width and line ending.

Also changes the input parameters of encapsulated_len, which now accepts the length of the raw input data prior to Base64 encoding, making it significantly less error prone.

Together these functions are used to DRY out similar calculations presently occurring in the der and ssh-key crates.

This is a breaking change, so it also bumps the version to v0.6.0-pre.

Estimates upper bound of the length of encoded line-wrapped Base64 with
a specified customizable line width and line ending.

Also changes the input parameters of `encapsulated_len`, which now
accepts the length of the raw input data prior to Base64 encoding,
making it significantly less error prone.

Together these functions are used to DRY out similar calculations
presently occurring in the `der` and `ssh-key` crates.

This is a breaking change, so it also bumps the version to v0.6.0-pre.
@tarcieri tarcieri changed the title pem-rfc7468: add encapsulated_len_wrapped pem-rfc7468: revamp encapsulated length calculation functions Apr 26, 2022
@tarcieri tarcieri merged commit 2ce2e19 into master Apr 26, 2022
@tarcieri tarcieri deleted the pem-rfc7468/encapsulated-len-wrapped branch April 26, 2022 18:15
@tarcieri tarcieri mentioned this pull request Apr 26, 2022
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