How to convert a license file to BASE64?

Issue:

I need to convert regula.license file to BASE64.

Solution:

To convert a binary file to Base64 format, you can use the command line in Windows PowerShell or MacOS Terminal.

For Windows PowerShell, use the command:

[convert]::ToBase64String((Get-Content -path "regula.license" -Encoding byte))

For Windows PowerShell 6 and higher you can use:

[convert]::ToBase64String((Get-Content -Path "regula.license" -AsByteStream))

In MacOS Terminal, use the command:

base64 -i "your_file_path"
Was this article helpful?
2 out of 2 found this helpful

Comments

1 comment
Date Votes
  • For PowerShell 6+ [convert]::ToBase64String((Get-Content -Path "regula.license" -AsByteStream)) seems to work.

    1

Please sign in to leave a comment.

Articles in this section

See more