Faulty base64 conversion

I’m running QNX version 6.5.0

In a console, I use this command :
uuencode -m /dev/null

I get prompted (with an empty line) for my input, I type the following and then the [ENTER] key :

I get the follwing result

When I use WIN’s powershell, I get d2ktZHc3NMT= (equal sign instead of K at the end), which works in the application which uses that expression. The one with the “K” at its end will not work.
PS C:\Users\sander-sar> [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(“wi-dw753”))

Is that a bug or did I miss something wehen typing the command or setting op my console ?

You probably made a typo in the result. It should be NTM not NMT.

Anyway, the difference is for with or without newline for the string. Below is an example from my Mac:

$ echo wi-dw753 | base64 
$ echo -n wi-dw753 | base64 

Both strings should work in Powershell, assuming you fix the typo and use d2ktZHc3NTMK

I tried PowerShell and included the newline, it gives the same result as QNX:

PS C:\Users\Admin> [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("wi-dw753`n"))


I fixed the typo.
You’re right when you include the newline character. Only “d2ktZHc3NTM=” lets me log into my mailaccount, whereas “d2ktZHc3NTMK” will not.
Anyway, now I know where I have to take care whenever I change my password. Thank you for your help !

powershell base64

I’m sorry but I have to come back for this :

when I type uuencode -m /dev/null I am prompted for input with an empty line. I type “wi-dw753” (without the quotation marks), then I hit the ENTER key.
The result is : d2ktZHc3NTMK

I read I should add a newline character after “wi-dw753”, but I don’t know how to do that (any ’ or \ in combination with a printable character just converts that too, instead of adding a newline here).
I’m willing to write some small code for compilation, which doesn’t seem to be much work, but I’m still curious to do the job from the command line.

Can you try the echo command.

echo wi-dw753 | uuencode -m

If this doesn’t work you can add the \n into the echo input.

echo wi-dw753\n | uuencode -m


The ‘echo’ command did not work.
I guess I’ll better try and write/compile something in C oder C++, the internet is full of code. Copying the file and making it executable is two more steps, but it’ll save our precious time here.

Thank you for looking into this !

The output looks a little weird, but when I type “echo -n wi-dw753 | uuencode -m /dev/null” I get the same output that WIN Powershell or internet converters give.
qnx base64

So it’s all good then?


Yes, it is !
I randomly tried “your” echo with uuencode together with “Admin”'s -n.