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

Standard library: Base64 #4651

Closed
robin-aws opened this issue Oct 11, 2023 · 0 comments · Fixed by #4747
Closed

Standard library: Base64 #4651

robin-aws opened this issue Oct 11, 2023 · 0 comments · Fixed by #4747
Assignees
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny part: standard libraries Standard libraries packaged in the Dafny distribution

Comments

@robin-aws
Copy link
Member

Base 64 encoding and decoding.

Existing source:

dafny-lang/libraries/pull/3
aws/aws-cryptographic-material-providers-library-dafny/StandardLibrary/src/Base64.dfy

@robin-aws robin-aws added this to the Dafny Standard Libraries milestone Oct 11, 2023
@robin-aws robin-aws added part: standard libraries Standard libraries packaged in the Dafny distribution kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny labels Oct 11, 2023
@atomb atomb self-assigned this Oct 17, 2023
atomb added a commit that referenced this issue Nov 9, 2023
# Description

Add an implementation of Base64 to the standard library.

Along the way, update the pretty-printer to include the `opaque` keyword
when needed. It was previously missing, which led to `.doo` files
dropping it (which in turn makes this code fail to resolve).

Fixes #4651 

# How has this been tested?

The example in
`Source/DafnyStandardLibraries/examples/Base64Examples.dfy` includes a
number of test cases that all pass with several language backends. Note that
the code isn't as optimized as it could be. The commented-out test for larger
input sizes doesn't complete in a reasonable amount of time for Go or JS.

By submitting this pull request, I confirm that my contribution is made
under the terms of the MIT license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny part: standard libraries Standard libraries packaged in the Dafny distribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants