Last active
August 9, 2017 01:53
-
-
Save mattwoolnough/4851607e5e496d7e472c677d40a1cd02 to your computer and use it in GitHub Desktop.
Base 64 Unix to Win
This file contains 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
*nix b64 encode binary file | |
base64 -i ~/Downloads/site.lic | |
Windows 64 encode binary file | |
$FileName = "C:\site.lic" | |
$base64string = [Convert]::ToBase64String([IO.File]::ReadAllBytes($FileName)) | |
$base64string | Out-File "c:\lic.b64.txt" | |
Windows Decode b64 encoded file | |
$data = gc .\lic.b64.txt | |
$bytes = [Convert]::FromBase64String($data) | |
[IO.File]::WriteAllBytes("C:\Users\admin\Documents\site.lic" ,$bytes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment