Forum Discussion
HemanthH_
Qrew Member
I am using PowerShell. The file is a AES KEY, used to encrypt confidential data. When I convert from Base64, it seems to be adding some extra characters at the beginning.
Is there a way to download the file itself, rather than getting the data in Base64 format ?
------------------------------
Hemanth H.
------------------------------
Is there a way to download the file itself, rather than getting the data in Base64 format ?
------------------------------
Hemanth H.
------------------------------
SimonH
3 years agoQrew Cadet
You are downloading the file itself, however it is base64 encoded.
Are you simply decoding it and reading it in to your script?
keep i mind that it is not base64 encoded TEXT which can simply be decoded and read as is
it is a file which means there is other metadata encoded in there as well.
You might be doing this
https://base64.guru/converter/decode/text
When you should be doing this
https://base64.guru/converter/decode/file
I have a working python solution but i am not familiar with poweshell. you can try the solution found here to write to a file
https://stackoverflow.com/questions/35334928/convert-base64-string-to-file
and then open the file to ensure it matches exactly.
------------------------------
Simon H
------------------------------
Are you simply decoding it and reading it in to your script?
keep i mind that it is not base64 encoded TEXT which can simply be decoded and read as is
it is a file which means there is other metadata encoded in there as well.
You might be doing this
https://base64.guru/converter/decode/text
When you should be doing this
https://base64.guru/converter/decode/file
I have a working python solution but i am not familiar with poweshell. you can try the solution found here to write to a file
https://stackoverflow.com/questions/35334928/convert-base64-string-to-file
and then open the file to ensure it matches exactly.
------------------------------
Simon H
------------------------------
Related Content
- 4 months ago
- 11 months ago