script
unanchored
powershell-base64-encode
Base64-encode a string or file. Supports URL-safe mode.
powershellbase64utilityencoding
Body
param([string]$text="",[string]$file="",[switch]$url)\nif($file){$bytes=[IO.File]::ReadAllBytes($file)}\nelseif($text){$bytes=[Text.Encoding]::UTF8.GetBytes($text)}\nelse{Write-Error "text or file required";exit 1}\n$b64=[Convert]::ToBase64String($bytes)\nif($url){$b64=$b64.Replace("+","-").Replace("/","_").TrimEnd("=")}\nWrite-Output $b64
Provenance
Cryptographic details
| id | reg_ps_base64_encode |
| content sha256 | e56f18002ade53bbb7b9c112aa38cc451d1b5b9aba5482aaaa0e1fc050ea8bcb |
Execute via API
POST /api/execute
{ "ref": "reg_ps_base64_encode" }
// or by hash prefix:
{ "ref": "e56f18002ade53bb" }
Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.