Hi
I guess the problem is the range over the input.
if you have utf8 runes > 1byte in your input,
you are not iterating with over each byte anymore.
the i is the index of a encoded rune the string., right?
Sent from my iPhone
> On 19. Jan 2019, at 13:53, Soorya Prakash wrote:
>
>
> I am using
On Sun, Jan 20, 2019 at 4:13 PM Soorya Prakash
wrote:
> for i := range input {
> output += string(input[i] ^ key[i%len(key)])
> }
BTW, that's O(n^2).
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this g
I am using the below code to encrypt and decrypt the data. Now I want to
encrypt the data from Node JS and want to decrypt the data from Go lang.
But I am not able to achieve it using GO lang.
var B64XorCipher = {
encode: function(key, data) {
return new Buffer(xorStrings(key, data),'utf8