Private/Password/Get-SecretSharingPasswordConstant.ps1
|
function Get-SecretSharingPasswordConstant { <# .SYNOPSIS Returns the alphabet New-SecretSharingPassword draws characters from. .DESCRIPTION 62 alphanumeric characters (A-Z, a-z, 0-9) plus 13 curated symbols (! # % & * + - . = @ ^ _ ~), chosen so a generated password stays usable when pasted into a shell command, URL, CSV file, JSON document, or SQL statement without extra escaping. Deliberately excludes: quotes and backtick (' " `) and backslash (\) - string/escape delimiters in almost every language; comma (,) - the CSV field separator; semicolon (;) and pipe (|) - shell statement/pipeline separators; angle brackets (< >) - shell redirection and HTML; parentheses, brackets, and braces (( ) [ ] { }) - regex/JSON/shell-subshell delimiters; slash and colon (/ :) - path and URL separators; dollar sign ($) - shell variable expansion; question mark (?) - URL query string and glob wildcard. #> [CmdletBinding()] [OutputType([PSCustomObject])] param() $alphabet = [byte[]]( (48..57) + (65..90) + (97..122) + @(33, 35, 37, 38, 42, 43, 45, 46, 61, 64, 94, 95, 126) ) return [PSCustomObject]@{ Alphabet = $alphabet } } |