feat: Migrate Base64 functions to Rust library#23
Merged
Conversation
Adds new function to convert byte arrays to strings with encoding support. Supports ASCII, BigEndianUnicode, Default, Unicode, UTF32, and UTF8 encodings. This is the inverse operation of ConvertFrom-StringToByteArray. - Add bytes_to_string Rust FFI function with 17 tests - Add ConvertFrom-ByteArrayToString PowerShell function with 43 Pester tests - Add DllImport binding in RustInterop.ps1 - Add function documentation and update CHANGELOG - Update ConvertFrom-StringToByteArray docs to reference inverse function
- Replace .NET System.Convert.FromBase64String with Rust base64_to_bytes - Update ConvertFrom-Base64ToMemoryStream test for Rust error messages
- Replace .NET System.Convert and System.Text.Encoding with Rust base64_to_string and base64_to_bytes - Update tests for Rust error messages
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.
Summary
This PR migrates additional Base64 functions to use the Rust
convert_corelibrary for consistency and improved error handling.Changes
.NET System.Convert.FromBase64Stringwith Rustbase64_to_bytes.NET System.ConvertandSystem.Text.Encodingwith Rustbase64_to_stringandbase64_to_bytescargo fmtformatting toencoding.rsRelated
Builds on #15 (ConvertFrom-ByteArrayToString)