From b4fdfe8275a8d01fa449b390e54577db484fb06e Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 26 Feb 2025 20:39:11 +0100 Subject: [PATCH 1/5] Enhance README and add function documentation for Base64 module; include usage examples and tests for encoding/decoding functions. --- README.md | 82 +++++++++++++------- src/functions/public/ConvertFrom-Base64.ps1 | 33 +++++--- src/functions/public/ConvertTo-Base64.ps1 | 30 ++++--- src/functions/public/Test-Base64.ps1 | 32 ++++++-- tests/{Module.Tests.ps1 => Base64.Tests.ps1} | 0 5 files changed, 120 insertions(+), 57 deletions(-) rename tests/{Module.Tests.ps1 => Base64.Tests.ps1} (100%) diff --git a/README.md b/README.md index a342324..25596df 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,24 @@ # Base64 -{{ DESCRIPTION }} +Base64 is a lightweight PowerShell module that provides a set of functions for encoding and decoding strings using Base64 encoding. Designed to be +simple, efficient, and cross-platform, this module leverages pipeline-friendly commands to integrate seamlessly into your automation workflows. + +## Module Features + +- **ConvertTo-Base64**: Transforms a plain text string into its Base64 encoded equivalent. +- **ConvertFrom-Base64**: Decodes a Base64 encoded string back into a human-readable UTF-8 string. +- **Test-Base64**: Validates whether a string is a properly formatted Base64 encoded string. + +Ever questioned whether your Base64 data is truly valid? With **Test-Base64**, you can be skeptical and verify it for yourself. ## Prerequisites -This uses the following external resources: -- The [PSModule framework](https://github.com/PSModule) for building, testing and publishing the module. +This module utilizes the [PSModule framework](https://github.com/PSModule) for building, testing, and publishing. It is compatible with PowerShell +Core as well as Windows PowerShell—so whether you're on Windows, Linux, or macOS, you're covered. ## Installation -To install the module from the PowerShell Gallery, you can use the following command: +To install the module from the PowerShell Gallery, run the following commands: ```powershell Install-PSResource -Name Base64 @@ -18,52 +27,69 @@ Import-Module -Name Base64 ## Usage -Here is a list of example that are typical use cases for the module. +Here are some example use cases to get you started with the module: -### Example 1: Greet an entity +### Convert a String to Base64 -Provide examples for typical commands that a user would like to do with the module. +Encode a plain text string into its Base64 representation: ```powershell -Greet-Entity -Name 'World' -Hello, World! +"Hello World" | ConvertTo-Base64 ``` -### Example 2 +**Expected Output:** + +```powershell +SGVsbG8gV29ybGQ= +``` -Provide examples for typical commands that a user would like to do with the module. +### Decode a Base64 String + +Convert a Base64 encoded string back to its original human-readable format: ```powershell -Import-Module -Name Base64 +"SGVsbG8gV29ybGQ=" | ConvertFrom-Base64 +``` + +**Expected Output:** + +```powershell +Hello World ``` -### Find more examples +### Validate a Base64 String + +Check if a string is a valid Base64 encoded string: -To find more examples of how to use the module, please refer to the [examples](examples) folder. +```powershell +"SGVsbG8gV29ybGQ=" | Test-Base64 +``` -Alternatively, you can use the Get-Command -Module 'This module' to find more commands that are available in the module. -To find examples of each of the commands you can use Get-Help -Examples 'CommandName'. +**Expected Output:** + +```powershell +True +``` + +Because in automation, a skeptical mind is the best safety net—if it passes the tests, you can trust it (at least until the next edge case shows up). ## Documentation -Link to further documentation if available, or describe where in the repository users can find more detailed documentation about -the module's functions and features. +For more detailed documentation on each function—including parameters, examples, and edge case handling—refer to the inline help provided in each script or visit: + +- [ConvertFrom-Base64 Documentation](https://psmodule.io/Base64/Functions/ConvertFrom-Base64/) +- [ConvertTo-Base64 Documentation](https://psmodule.io/Base64/Functions/ConvertTo-Base64/) +- [Test-Base64 Documentation](https://psmodule.io/Test/Functions/Test-Base64) ## Contributing -Coder or not, you can contribute to the project! We welcome all contributions. +Whether you’re a coder or a user with invaluable feedback, your contributions can make this module even better. ### For Users -If you don't code, you still sit on valuable information that can make this project even better. If you experience that the -product does unexpected things, throw errors or is missing functionality, you can help by submitting bugs and feature requests. -Please see the issues tab on this project and submit a new issue that matches your needs. +If you encounter unexpected behavior or think something is missing, please open an issue on [GitHub Issues](https://github.com/yourusername/Base64/issues). +Your skepticism is welcome—it only makes the project stronger. ### For Developers -If you do code, we'd love to have your contributions. Please read the [Contribution guidelines](CONTRIBUTING.md) for more information. -You can either help by picking up an existing issue or submit a new one if you have an idea for a new feature or improvement. - -## Acknowledgements - -Here is a list of people and projects that helped this project in some way. +Developers, feel free to contribute code improvements or new features. Please read the [Contribution Guidelines](CONTRIBUTING.md) to learn how to get started. diff --git a/src/functions/public/ConvertFrom-Base64.ps1 b/src/functions/public/ConvertFrom-Base64.ps1 index fa00cfc..7f6312e 100644 --- a/src/functions/public/ConvertFrom-Base64.ps1 +++ b/src/functions/public/ConvertFrom-Base64.ps1 @@ -1,35 +1,44 @@ filter ConvertFrom-Base64 { <# .SYNOPSIS - Convert to string from base64 + Decodes a Base64-encoded string into a UTF-8 string. .DESCRIPTION - Converts a base64 encoded string to a string. + Converts a Base64-encoded string into a human-readable UTF-8 string. The function accepts input from the pipeline + and validates the input using the `Test-Base64` function before decoding. .EXAMPLE - ConvertFrom-Base64 -Base64String 'VGhpc0lzQU5pY2VTdHJpbmc=' - ThisIsANiceString + "U29tZSBkYXRh" | ConvertFrom-Base64 - Converts the base64 encoded string 'VGhpc0lzQU5pY2VTdHJpbmc=' to a string. + Output: + ```powershell + Some data + ``` - .EXAMPLE - 'SGVsbG8gV29ybGQ=' | ConvertFrom-Base64String - Hello World + Decodes the Base64-encoded string "U29tZSBkYXRh" into its original UTF-8 representation. + + .OUTPUTS + System.String + + .NOTES + The decoded UTF-8 string. - Converts the string from base64 to a regular string. + .LINK + https://psmodule.io/Base64/Functions/ConvertFrom-Base64/ #> [Alias('ConvertFrom-Base64String')] [OutputType([string])] [CmdletBinding()] param( - # The base64 encoded string to convert. + # The Base64-encoded string to be decoded. [Parameter( Mandatory, - ValueFromPipeline + ValueFromPipeline, + ValueFromPipelineByPropertyName )] [ValidateScript({ Test-Base64 -Base64String $_ }, ErrorMessage = 'Invalid Base64 string')] [string] $Base64String ) - return [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($Base64String)) + [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($Base64String)) } diff --git a/src/functions/public/ConvertTo-Base64.ps1 b/src/functions/public/ConvertTo-Base64.ps1 index 05a1fd6..1007609 100644 --- a/src/functions/public/ConvertTo-Base64.ps1 +++ b/src/functions/public/ConvertTo-Base64.ps1 @@ -1,28 +1,36 @@ filter ConvertTo-Base64 { <# .SYNOPSIS - Convert a string to base64 + Converts a string to its Base64 encoded representation. .DESCRIPTION - Converts a string to a base64 encoded string. + This function takes a string as input and converts it to a Base64 encoded string using UTF-8 encoding. + It accepts input from the pipeline and can process string values directly. .EXAMPLE - ConvertTo-Base64 -String 'ThisIsANiceString' - VGhpc0lzQU5pY2VTdHJpbmc= + "Hello World" | ConvertTo-Base64 - Converts the string 'ThisIsANiceString' to a base64 encoded string. - - .EXAMPLE - 'Hello World' | ConvertTo-Base64 + Output: + ```powershell SGVsbG8gV29ybGQ= + ``` + + Converts the string "Hello World" to its Base64 encoded equivalent. + + .OUTPUTS + System.String + + .NOTES + The Base64 encoded representation of the input string. - Converts the string 'Hello World' to base64. + .LINK + https://psmodule.io/Base64/Functions/ConvertTo-Base64/ #> [Alias('ConvertTo-Base64String')] [OutputType([string])] [CmdletBinding()] param( - # The string to convert to base64 + # The input string to be converted to Base64 encoding. [Parameter( Mandatory, ValueFromPipeline, @@ -30,5 +38,5 @@ )] [string] $String ) - return [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($String)) + [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($String)) } diff --git a/src/functions/public/Test-Base64.ps1 b/src/functions/public/Test-Base64.ps1 index ade81cd..2796f97 100644 --- a/src/functions/public/Test-Base64.ps1 +++ b/src/functions/public/Test-Base64.ps1 @@ -1,26 +1,46 @@ filter Test-Base64 { <# .SYNOPSIS - Test if a string is a valid base64 string. + Determines whether a given string is a valid base64-encoded string. .DESCRIPTION - Test if a string is a valid base64 string. + This function checks whether the provided string is a valid base64-encoded string. + It attempts to decode the input using `[Convert]::FromBase64String()`. + If the decoding succeeds, it returns `$true`; otherwise, it returns `$false`. .EXAMPLE Test-Base64 -Base64String 'U29tZSBkYXRh' + + Output: + ```powershell True + ``` - Returns $true as the string is a valid base64 string. + Returns `$true` as the string is a valid base64-encoded string. .EXAMPLE 'U29tZSBkYXRh' | Test-Base64 + + Output: + ```powershell True + ``` + + Returns `$true` as the string is a valid base64-encoded string. + + .OUTPUTS + bool + + .NOTES + Returns `$true` if the string is a valid base64-encoded string, otherwise `$false`. - Returns $true as the string is a valid base64 string. + .LINK + https://psmodule.io/Test/Functions/Test-Base64 #> [OutputType([bool])] [CmdletBinding()] param ( + # The base64-encoded string to validate. [Parameter( Mandatory, ValueFromPipeline @@ -30,8 +50,8 @@ try { $null = [Convert]::FromBase64String($Base64String) - return $true + $true } catch { - return $false + $false } } diff --git a/tests/Module.Tests.ps1 b/tests/Base64.Tests.ps1 similarity index 100% rename from tests/Module.Tests.ps1 rename to tests/Base64.Tests.ps1 From a7728cc0e5d7fb031e1c6b4f43727e706d246d8c Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 26 Feb 2025 20:48:45 +0100 Subject: [PATCH 2/5] re-reg workflow files --- .github/{ => linters}/workflows/Linter.yml | 0 .github/{ => linters}/workflows/Nightly-Run.yml | 0 .github/{ => linters}/workflows/Process-PSModule.yml | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename .github/{ => linters}/workflows/Linter.yml (100%) rename .github/{ => linters}/workflows/Nightly-Run.yml (100%) rename .github/{ => linters}/workflows/Process-PSModule.yml (100%) diff --git a/.github/workflows/Linter.yml b/.github/linters/workflows/Linter.yml similarity index 100% rename from .github/workflows/Linter.yml rename to .github/linters/workflows/Linter.yml diff --git a/.github/workflows/Nightly-Run.yml b/.github/linters/workflows/Nightly-Run.yml similarity index 100% rename from .github/workflows/Nightly-Run.yml rename to .github/linters/workflows/Nightly-Run.yml diff --git a/.github/workflows/Process-PSModule.yml b/.github/linters/workflows/Process-PSModule.yml similarity index 100% rename from .github/workflows/Process-PSModule.yml rename to .github/linters/workflows/Process-PSModule.yml From de6308c99dd5c2c054c8bb1d4047cf3435093d80 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 26 Feb 2025 20:52:59 +0100 Subject: [PATCH 3/5] Add configuration files for linters and workflows; update license year --- .github/linters/.jscpd.json | 10 + .../linters/.powershell-psscriptanalyzer.psd1 | 67 ++- .github/linters/.textlintrc | 513 ++++++++++++++++++ .github/{linters => }/workflows/Linter.yml | 1 + .../{linters => }/workflows/Nightly-Run.yml | 0 .../workflows/Process-PSModule.yml | 0 .gitignore | 7 + LICENSE | 2 +- 8 files changed, 585 insertions(+), 15 deletions(-) create mode 100644 .github/linters/.jscpd.json create mode 100644 .github/linters/.textlintrc rename .github/{linters => }/workflows/Linter.yml (94%) rename .github/{linters => }/workflows/Nightly-Run.yml (100%) rename .github/{linters => }/workflows/Process-PSModule.yml (100%) diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json new file mode 100644 index 0000000..23970e8 --- /dev/null +++ b/.github/linters/.jscpd.json @@ -0,0 +1,10 @@ +{ + "threshold": 0, + "reporters": [ + "consoleFull" + ], + "ignore": [ + "**/tests/**" + ], + "absolute": true +} diff --git a/.github/linters/.powershell-psscriptanalyzer.psd1 b/.github/linters/.powershell-psscriptanalyzer.psd1 index 570ac0d..09cc3d0 100644 --- a/.github/linters/.powershell-psscriptanalyzer.psd1 +++ b/.github/linters/.powershell-psscriptanalyzer.psd1 @@ -1,17 +1,56 @@ -#Documentation: https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Cmdlets/Invoke-ScriptAnalyzer.md#-settings -@{ - #CustomRulePath='path\to\CustomRuleModule.psm1' - #RecurseCustomRulePath='path\of\customrules' - #Severity = @( - # 'Error' - # 'Warning' - #) - #IncludeDefaultRules=${true} +@{ + Rules = @{ + PSAlignAssignmentStatement = @{ + Enable = $true + CheckHashtable = $true + } + PSAvoidLongLines = @{ + Enable = $true + MaximumLineLength = 150 + } + PSAvoidSemicolonsAsLineTerminators = @{ + Enable = $true + } + PSPlaceCloseBrace = @{ + Enable = $true + NewLineAfter = $false + IgnoreOneLineBlock = $true + NoEmptyLineBefore = $false + } + PSPlaceOpenBrace = @{ + Enable = $true + OnSameLine = $true + NewLineAfter = $true + IgnoreOneLineBlock = $true + } + PSProvideCommentHelp = @{ + Enable = $true + ExportedOnly = $false + BlockComment = $true + VSCodeSnippetCorrection = $false + Placement = 'begin' + } + PSUseConsistentIndentation = @{ + Enable = $true + IndentationSize = 4 + PipelineIndentation = 'IncreaseIndentationForFirstPipeline' + Kind = 'space' + } + PSUseConsistentWhitespace = @{ + Enable = $true + CheckInnerBrace = $true + CheckOpenBrace = $true + CheckOpenParen = $true + CheckOperator = $true + CheckPipe = $true + CheckPipeForRedundantWhitespace = $true + CheckSeparator = $true + CheckParameter = $true + IgnoreAssignmentOperatorInsideHashTable = $true + } + } ExcludeRules = @( - 'PSMissingModuleManifestField' + 'PSMissingModuleManifestField', # This rule is not applicable until the module is built. + 'PSUseToExportFieldsInManifest' ) - #IncludeRules = @( - # 'PSAvoidUsingWriteHost', - # 'MyCustomRuleName' - #) } diff --git a/.github/linters/.textlintrc b/.github/linters/.textlintrc new file mode 100644 index 0000000..db48de8 --- /dev/null +++ b/.github/linters/.textlintrc @@ -0,0 +1,513 @@ +{ + "filters": { + "comments": true + }, + "rules": { + "terminology": { + "defaultTerms": false, + "terms": [ + "Airbnb", + "Android", + "AppleScript", + "AppVeyor", + "AVA", + "BrowserStack", + "Browsersync", + "Codecov", + "CodePen", + "CodeSandbox", + "DefinitelyTyped", + "EditorConfig", + "ESLint", + "GitHub", + "GraphQL", + "GraphiQL", + "iOS", + "JavaScript", + "JetBrains", + "jQuery", + "LinkedIn", + "Lodash", + "MacBook", + "Markdown", + "OpenType", + "PayPal", + "PhpStorm", + "PowerShell", + "PlayStation", + "RubyMine", + "Sass", + "SemVer", + "TypeScript", + "UglifyJS", + "Wasm", + "WebAssembly", + "WebStorm", + "WordPress", + "YouTube", + [ + "Common[ .]js", + "CommonJS" + ], + [ + "JSDocs?", + "JSDoc" + ], + [ + "Node[ .]js", + "Node.js" + ], + [ + "React[ .]js", + "React" + ], + [ + "SauceLabs", + "Sauce Labs" + ], + [ + "StackOverflow", + "Stack Overflow" + ], + [ + "styled ?components", + "styled-components" + ], + [ + "HTTP[ /]2(?:\\.0)?", + "HTTP/2" + ], + [ + "OS X", + "macOS" + ], + [ + "Mac ?OS", + "macOS" + ], + [ + "a npm", + "an npm" + ], + "ECMAScript", + [ + "ES2015", + "ES6" + ], + [ + "ES7", + "ES2016" + ], + "3D", + [ + "3-D", + "3D" + ], + "Ajax", + "API", + "APIs", + "API's", + [ + "(? Date: Wed, 26 Feb 2025 21:14:48 +0100 Subject: [PATCH 4/5] Refactor Base64 conversion functions to use consistent casing and add encoding parameter --- src/functions/public/ConvertFrom-Base64.ps1 | 17 +++++++++++------ src/functions/public/ConvertTo-Base64.ps1 | 19 ++++++++++++------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/functions/public/ConvertFrom-Base64.ps1 b/src/functions/public/ConvertFrom-Base64.ps1 index 7f6312e..1162800 100644 --- a/src/functions/public/ConvertFrom-Base64.ps1 +++ b/src/functions/public/ConvertFrom-Base64.ps1 @@ -1,10 +1,10 @@ filter ConvertFrom-Base64 { <# .SYNOPSIS - Decodes a Base64-encoded string into a UTF-8 string. + Decodes a base64-encoded string into a UTF-8 string. .DESCRIPTION - Converts a Base64-encoded string into a human-readable UTF-8 string. The function accepts input from the pipeline + Converts a base64-encoded string into a human-readable UTF-8 string. The function accepts input from the pipeline and validates the input using the `Test-Base64` function before decoding. .EXAMPLE @@ -15,7 +15,7 @@ Some data ``` - Decodes the Base64-encoded string "U29tZSBkYXRh" into its original UTF-8 representation. + Decodes the base64-encoded string "U29tZSBkYXRh" into its original UTF-8 representation. .OUTPUTS System.String @@ -30,15 +30,20 @@ [OutputType([string])] [CmdletBinding()] param( - # The Base64-encoded string to be decoded. + # The base64-encoded string to be decoded. [Parameter( Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName )] [ValidateScript({ Test-Base64 -Base64String $_ }, ErrorMessage = 'Invalid Base64 string')] - [string] $Base64String + [string] $Base64String, + + # The encoding to use when converting the string to bytes. + [Parameter()] + [ValidateSet('UTF8', 'UTF7', 'UTF32', 'ASCII', 'Unicode', 'BigEndianUnicode', 'Latin1')] + [string] $Encoding = 'UTF8' ) - [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($Base64String)) + [System.Text.Encoding]::$Encoding.GetString([Convert]::FromBase64String($Base64String)) } diff --git a/src/functions/public/ConvertTo-Base64.ps1 b/src/functions/public/ConvertTo-Base64.ps1 index 1007609..40dbd13 100644 --- a/src/functions/public/ConvertTo-Base64.ps1 +++ b/src/functions/public/ConvertTo-Base64.ps1 @@ -1,10 +1,10 @@ filter ConvertTo-Base64 { <# .SYNOPSIS - Converts a string to its Base64 encoded representation. + Converts a string to its base64 encoded representation. .DESCRIPTION - This function takes a string as input and converts it to a Base64 encoded string using UTF-8 encoding. + This function takes a string as input and converts it to a base64 encoded string using UTF-8 encoding. It accepts input from the pipeline and can process string values directly. .EXAMPLE @@ -15,13 +15,13 @@ SGVsbG8gV29ybGQ= ``` - Converts the string "Hello World" to its Base64 encoded equivalent. + Converts the string "Hello World" to its base64 encoded equivalent. .OUTPUTS System.String .NOTES - The Base64 encoded representation of the input string. + The base64 encoded representation of the input string. .LINK https://psmodule.io/Base64/Functions/ConvertTo-Base64/ @@ -30,13 +30,18 @@ [OutputType([string])] [CmdletBinding()] param( - # The input string to be converted to Base64 encoding. + # The input string to be converted to base64 encoding. [Parameter( Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName )] - [string] $String + [string] $String, + + # The encoding to use when converting the string to bytes. + [Parameter()] + [ValidateSet('UTF8', 'UTF7', 'UTF32', 'ASCII', 'Unicode', 'BigEndianUnicode', 'Latin1')] + [string] $Encoding = 'UTF8' ) - [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($String)) + [Convert]::ToBase64String([System.Text.Encoding]::$Encoding.GetBytes($String)) } From a01c67fdddcf76108ca2e9155bd1a6dc03b13087 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 26 Feb 2025 21:23:55 +0100 Subject: [PATCH 5/5] Update README to use consistent casing for Base64 references and improve clarity --- README.md | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 25596df..03a1bc1 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # Base64 -Base64 is a lightweight PowerShell module that provides a set of functions for encoding and decoding strings using Base64 encoding. Designed to be +base64 is a lightweight PowerShell module that provides a set of functions for encoding and decoding strings using base64 encoding. Designed to be simple, efficient, and cross-platform, this module leverages pipeline-friendly commands to integrate seamlessly into your automation workflows. ## Module Features -- **ConvertTo-Base64**: Transforms a plain text string into its Base64 encoded equivalent. -- **ConvertFrom-Base64**: Decodes a Base64 encoded string back into a human-readable UTF-8 string. -- **Test-Base64**: Validates whether a string is a properly formatted Base64 encoded string. +- `ConvertTo-Base64`: Transforms a plain text string into its base64 encoded equivalent. +- `ConvertFrom-Base64`: Decodes a base64 encoded string back into a human-readable UTF-8 string. +- `Test-Base64`: Validates whether a string is a properly formatted base64 encoded string. -Ever questioned whether your Base64 data is truly valid? With **Test-Base64**, you can be skeptical and verify it for yourself. +Ever questioned whether your base64 data is truly valid? With `Test-Base64`, you can be skeptical and verify it for yourself. ## Prerequisites @@ -29,9 +29,9 @@ Import-Module -Name Base64 Here are some example use cases to get you started with the module: -### Convert a String to Base64 +### Convert a String to base64 -Encode a plain text string into its Base64 representation: +Encode a plain text string into its base64 representation: ```powershell "Hello World" | ConvertTo-Base64 @@ -43,9 +43,9 @@ Encode a plain text string into its Base64 representation: SGVsbG8gV29ybGQ= ``` -### Decode a Base64 String +### Decode a base64 String -Convert a Base64 encoded string back to its original human-readable format: +Convert a base64 encoded string back to its original human-readable format: ```powershell "SGVsbG8gV29ybGQ=" | ConvertFrom-Base64 @@ -57,9 +57,9 @@ Convert a Base64 encoded string back to its original human-readable format: Hello World ``` -### Validate a Base64 String +### Validate a base64 String -Check if a string is a valid Base64 encoded string: +Check if a string is a valid base64 encoded string: ```powershell "SGVsbG8gV29ybGQ=" | Test-Base64 @@ -73,14 +73,6 @@ True Because in automation, a skeptical mind is the best safety net—if it passes the tests, you can trust it (at least until the next edge case shows up). -## Documentation - -For more detailed documentation on each function—including parameters, examples, and edge case handling—refer to the inline help provided in each script or visit: - -- [ConvertFrom-Base64 Documentation](https://psmodule.io/Base64/Functions/ConvertFrom-Base64/) -- [ConvertTo-Base64 Documentation](https://psmodule.io/Base64/Functions/ConvertTo-Base64/) -- [Test-Base64 Documentation](https://psmodule.io/Test/Functions/Test-Base64) - ## Contributing Whether you’re a coder or a user with invaluable feedback, your contributions can make this module even better.