I didn't write this..
-
no I didn't... ..a much younger me wrote this piece of "code" which is bad in so many ways I don't even want to count them:
CString StrEncode(CString str, bool decode)
{
CString map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";short len = map.GetLength(); short add = decode ? len : 0; short mul = decode ? -1 : 1; short off = str.GetLength() % len; CString out; for(short i=0; iThe only good thing about it is that it served its purpose of weakly obfuscating strings.
Please absolve me :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
no I didn't... ..a much younger me wrote this piece of "code" which is bad in so many ways I don't even want to count them:
CString StrEncode(CString str, bool decode)
{
CString map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";short len = map.GetLength(); short add = decode ? len : 0; short mul = decode ? -1 : 1; short off = str.GetLength() % len; CString out; for(short i=0; iThe only good thing about it is that it served its purpose of weakly obfuscating strings.
Please absolve me :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
Sascha Lefèvre wrote:
Please absolve me
To be forgiven, you must obtain an abacus from ebay and perform the computations of your algorithm by hand with nothing but the abacus. ;)
Latest Article - Class-less Coding - Minimalist C# and Why F# and Function Programming Has Some Advantages Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
no I didn't... ..a much younger me wrote this piece of "code" which is bad in so many ways I don't even want to count them:
CString StrEncode(CString str, bool decode)
{
CString map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";short len = map.GetLength(); short add = decode ? len : 0; short mul = decode ? -1 : 1; short off = str.GetLength() % len; CString out; for(short i=0; iThe only good thing about it is that it served its purpose of weakly obfuscating strings.
Please absolve me :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
I fixed it for you : FTFY - rewrote it in C# so you can run it in LINQPad[^] I'll put this out on GitHub as soon as possible. :laugh:
void Main()
{
Console.WriteLine(StrEncode("Here it is", true));
Console.WriteLine(StrEncode("´;µsDUkGäB", false));
}String StrEncode(String str, bool decode)
{
String map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";int len = map.Length; int add = decode ? len : 0; int mul = decode ? -1 : 1; int off = str.Length % len; String outMsg = String.Empty; //Console.WriteLine(map); for(int i=0; i
Here's the resulting output:
´;µsDUkGäB
Here it is -
no I didn't... ..a much younger me wrote this piece of "code" which is bad in so many ways I don't even want to count them:
CString StrEncode(CString str, bool decode)
{
CString map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";short len = map.GetLength(); short add = decode ? len : 0; short mul = decode ? -1 : 1; short off = str.GetLength() % len; CString out; for(short i=0; iThe only good thing about it is that it served its purpose of weakly obfuscating strings.
Please absolve me :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
Pfft... Dictionaries are so much faster than string searches... :~
-
no I didn't... ..a much younger me wrote this piece of "code" which is bad in so many ways I don't even want to count them:
CString StrEncode(CString str, bool decode)
{
CString map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";short len = map.GetLength(); short add = decode ? len : 0; short mul = decode ? -1 : 1; short off = str.GetLength() % len; CString out; for(short i=0; iThe only good thing about it is that it served its purpose of weakly obfuscating strings.
Please absolve me :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
Sascha Lefèvre wrote:
Please absolve me
Et nunc absolvo te ab peccatis tuis. Amen.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
-
Sascha Lefèvre wrote:
Please absolve me
Et nunc absolvo te ab peccatis tuis. Amen.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
And ten Hail Marys.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
Sascha Lefèvre wrote:
Please absolve me
To be forgiven, you must obtain an abacus from ebay and perform the computations of your algorithm by hand with nothing but the abacus. ;)
Latest Article - Class-less Coding - Minimalist C# and Why F# and Function Programming Has Some Advantages Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
I'll possibly carry this burden forever then :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
I fixed it for you : FTFY - rewrote it in C# so you can run it in LINQPad[^] I'll put this out on GitHub as soon as possible. :laugh:
void Main()
{
Console.WriteLine(StrEncode("Here it is", true));
Console.WriteLine(StrEncode("´;µsDUkGäB", false));
}String StrEncode(String str, bool decode)
{
String map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";int len = map.Length; int add = decode ? len : 0; int mul = decode ? -1 : 1; int off = str.Length % len; String outMsg = String.Empty; //Console.WriteLine(map); for(int i=0; i
Here's the resulting output:
´;µsDUkGäB
Here it isI can see you caught fire - maybe we can achieve great things together :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
Pfft... Dictionaries are so much faster than string searches... :~
That's one of those things I didn't even want to start counting..
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
Sascha Lefèvre wrote:
Please absolve me
Et nunc absolvo te ab peccatis tuis. Amen.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
Thank you :-D
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
I can see you caught fire - maybe we can achieve great things together :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
And ten Hail Marys.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
And put a pound in the poor box.
-
no I didn't... ..a much younger me wrote this piece of "code" which is bad in so many ways I don't even want to count them:
CString StrEncode(CString str, bool decode)
{
CString map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";short len = map.GetLength(); short add = decode ? len : 0; short mul = decode ? -1 : 1; short off = str.GetLength() % len; CString out; for(short i=0; iThe only good thing about it is that it served its purpose of weakly obfuscating strings.
Please absolve me :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
Sascha Lefèvre wrote:
Please absolve me :laugh:
In order to receive absolution, you must rewrite the entire application in VB6.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
-
Sascha Lefèvre wrote:
Please absolve me :laugh:
In order to receive absolution, you must rewrite the entire application in VB6.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
It might actually end up being better than it is.. :~
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
no I didn't... ..a much younger me wrote this piece of "code" which is bad in so many ways I don't even want to count them:
CString StrEncode(CString str, bool decode)
{
CString map = "S)y³T<.zÖ?tp3~o`u^F}G\\0D_K:>1µ5&|ßJ§ö $E!rÜq-I]W%=Xü´Yl/(78A#dHm@BvQLM'*Pc+2Äxf,ghCnsä;6UO{9a[b4Ne²wjkViRZ°";short len = map.GetLength(); short add = decode ? len : 0; short mul = decode ? -1 : 1; short off = str.GetLength() % len; CString out; for(short i=0; iThe only good thing about it is that it served its purpose of weakly obfuscating strings.
Please absolve me :laugh:
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
I've actually seen a Caeser Cipher[^] used to encode passwords, so that's not too bad by comparison.
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
-
I've actually seen a Caeser Cipher[^] used to encode passwords, so that's not too bad by comparison.
"If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
;)
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson