[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

String to Base76

dddudeman

7/7/2015 2:25:00 AM

I am writing an IRC bot in node.js and I am trying to implement base76
conversion. Similar to base64, but using a different number. It's a
stupid idea, but we want to use a base that isn't commonly used, not
really for security, but for privacy, if that makes any sense. The basic
idea that I have is to get the string and convert it to the ascii
character codes, then that string of numbers to base76 using a character
set that I made up. I think I'm going to use
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+=/\><^-_%$[]*"
but I have no idea if that's actually what's used in that base. Would I
be best off using the base64 module and modifying that or making mine
implementation in js?
54 Answers

ram

7/7/2015 3:57:00 AM

0

dddudeman <dddudeman9@gmail.com> writes:
>character codes, then that string of numbers to base76 using a character

See also:

en.wikipedia.org/wiki/Ascii85
base91.sourceforge.net

Thomas 'PointedEars' Lahn

7/7/2015 6:15:00 AM

0

dddudeman wrote:

> [â?¦] The basic idea that I have is to get the string and convert it to the
> ascii character codes, then that string of numbers to base76 using a
> character set that I made up. I think I'm going to use
> "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+=/\><^-
> _%$[]*" but I have no idea if that's actually what's used in that base.

It is *your* idea.

> Would I be best off using the base64 module and modifying that or making
> mine implementation in js?

Yes.

BTW, alt.comp.lang.javascript does not exist.

BTW2, get a *real* name.

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not cc me. / Bitte keine Kopien per E-Mail.

Evertjan.

7/7/2015 10:31:00 AM

0

dddudeman <dddudeman9@gmail.com> wrote on 07 Jul 2015 in
comp.lang.javascript:

[..]
> then that string of numbers to base76 using a character
> set that I made up. I think I'm going to use
> "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+=/\><^-_%
> $[]*" but I have no idea if that's actually what's used in that base.

Methinks you can use whatever you like.

You can also use accented letters
or Greek, Hebrew or Cyrillic letters,
using a 16bit characterset.

Why should "A" stand for zero and "0" for something else?

Customary is to start the conversion-string with the ordinary numbers,
and then the capitals.

> Would I be best off using the base64 module

What is "the" base64 module?

> and modifying that or making
> mine implementation in js?

Building your own gives far more satisfaction,
increases yous skill for other programming,
and makes the discussion here more fun.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

dddudeman

7/7/2015 5:13:00 PM

0

On 7/7/2015 02:15, Thomas 'PointedEars' Lahn wrote:
> dddudeman wrote:
>> Would I be best off using the base64 module and modifying that or making
>> mine implementation in js?
>
> Yes.
what

> BTW, alt.comp.lang.javascript does not exist.
I'm pretty sure it does and you just posted to it.

> BTW2, get a *real* name.
Why would I post under my real name?

dddudeman

7/7/2015 5:16:00 PM

0

On 7/7/2015 06:30, Evertjan. wrote:
> dddudeman <dddudeman9@gmail.com> wrote on 07 Jul 2015 in
> comp.lang.javascript:
>
> [..]
>> then that string of numbers to base76 using a character
>> set that I made up. I think I'm going to use
>> "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+=/\><^-_%
>> $[]*" but I have no idea if that's actually what's used in that base.
>
> Methinks you can use whatever you like.
>
> You can also use accented letters
> or Greek, Hebrew or Cyrillic letters,
> using a 16bit characterset.
>
> Why should "A" stand for zero and "0" for something else?
>
> Customary is to start the conversion-string with the ordinary numbers,
> and then the capitals.
That string is just the string used for typical base64 conversions with
\><^-_%$[]* added. Maybe I should use other letters to avoid having to
escape characters and things like that.
>> Would I be best off using the base64 module
>
> What is "the" base64 module?
https://www.npmjs.com/pack...
>> and modifying that or making
>> mine implementation in js?
>
> Building your own gives far more satisfaction,
> increases yous skill for other programming,
> and makes the discussion here more fun.
>
I'll try to implement it myself, thanks.

Evertjan.

7/7/2015 5:21:00 PM

0

dddudeman <dddudeman9@gmail.com> wrote on 07 Jul 2015 in
comp.lang.javascript:
> On 7/7/2015 02:15, Thomas 'PointedEars' Lahn wrote:
>> BTW, alt.comp.lang.javascript does not exist.
> I'm pretty sure it does and you just posted to it.

The dude is right here, Thomas.
It is a long dead and unnecessary NG.

>> BTW2, get a *real* name.
> Why would I post under my real name?

Because is is customary on this NG and decent.
Do you need obligations to do anything?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Wesley

7/7/2015 5:24:00 PM

0

On 7/7/2015 13:20, Evertjan. wrote:
> dddudeman <dddudeman9@gmail.com> wrote on 07 Jul 2015 in
> comp.lang.javascript:
>> On 7/7/2015 02:15, Thomas 'PointedEars' Lahn wrote:
>>> BTW, alt.comp.lang.javascript does not exist.
>> I'm pretty sure it does and you just posted to it.
>
> The dude is right here, Thomas.
> It is a long dead and unnecessary NG.
>
I just posted it there as well in case there was somebody who does check
it.
>>> BTW2, get a *real* name.
>> Why would I post under my real name?
>
> Because is is customary on this NG and decent.
> Do you need obligations to do anything?
>
There I fixed it, I'm just always hesitant to using my real name on the
internet. Sorry about that.

Evertjan.

7/7/2015 5:26:00 PM

0

dddudeman <dddudeman9@gmail.com> wrote on 07 Jul 2015 in
comp.lang.javascript:

>> Customary is to start the conversion-string with the ordinary numbers,
>> and then the capitals.
> That string is just the string used for typical base64 conversions with
> \><^-_%$[]* added. Maybe I should use other letters to avoid having to
> escape characters and things like that.

Well it is not,
a base-conversion string defines the characters used in order,
meseems .

>>> Would I be best off using the base64 module
>>
>> What is "the" base64 module?
> https://www.npmjs.com/pack...

Why is that "the" base64 module?

>>> and modifying that or making
>>> mine implementation in js?
>>
>> Building your own gives far more satisfaction,
>> increases yous skill for other programming,
>> and makes the discussion here more fun.
>>
> I'll try to implement it myself, thanks.

Yes, dude!

After the first try,
it might be advisable to peek into what others did,
because then you can appriciate or disapprove with them more.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Gene Wirchenko

7/7/2015 5:48:00 PM

0

On Tue, 07 Jul 2015 19:20:52 +0200, "Evertjan."
<exxjxw.hannivoort@inter.nl.net> wrote:

>dddudeman <dddudeman9@gmail.com> wrote on 07 Jul 2015 in
>comp.lang.javascript:
>> On 7/7/2015 02:15, Thomas 'PointedEars' Lahn wrote:
>>> BTW, alt.comp.lang.javascript does not exist.
>> I'm pretty sure it does and you just posted to it.
>
>The dude is right here, Thomas.
>It is a long dead and unnecessary NG.
>
>>> BTW2, get a *real* name.
>> Why would I post under my real name?
>
>Because is is customary on this NG and decent.
>Do you need obligations to do anything?

What is decent about it? Is "Evertjan." your real name? I
suspect that you have at least two strung together. I really do not
think that it matters as long as the person is consistent (no
nym-shifting) and the name is not rude.

Sincerely,

Gene Wirchenko

Wesley

7/7/2015 5:55:00 PM

0

On 7/7/2015 13:26, Evertjan. wrote:
> dddudeman <dddudeman9@gmail.com> wrote on 07 Jul 2015 in
> comp.lang.javascript:
>
>>> Customary is to start the conversion-string with the ordinary numbers,
>>> and then the capitals.
>> That string is just the string used for typical base64 conversions with
>> \><^-_%$[]* added. Maybe I should use other letters to avoid having to
>> escape characters and things like that.
>
> Well it is not,
> a base-conversion string defines the characters used in order,
> meseems .
>
>>>> Would I be best off using the base64 module
>>>
>>> What is "the" base64 module?
>> https://www.npmjs.com/pack...
>
> Why is that "the" base64 module?

I guess I just called it that since it is the one simply titled "base64"
so I thought that it was the "one to use" or whatever.

>>>> and modifying that or making
>>>> mine implementation in js?
>>>
>>> Building your own gives far more satisfaction,
>>> increases yous skill for other programming,
>>> and makes the discussion here more fun.
>>>
>> I'll try to implement it myself, thanks.
>
> Yes, dude!
>
> After the first try,
> it might be advisable to peek into what others did,
> because then you can appriciate or disapprove with them more.
>

The more I read about it the more complicated it seems. Oh boy.