Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Technical Support » Renegade Client » APGAR cipher to C#/VB.Net
Re: APGAR cipher to C#/VB.Net [message #369026 is a reply to message #368997] Mon, 26 January 2009 14:09 Go to previous message
halo2pac is currently offline  halo2pac
Messages: 659
Registered: December 2006
Location: Near Cleveland, Ohio
Karma:
Colonel
CarrierII wrote on Mon, 26 January 2009 09:30

First you missed the ./ off the end of the string U. It needs to be 64 characters long.

thought that was some sort of Perl escape thingy.

CarrierII wrote on Mon, 26 January 2009 09:30

Second, the "7 - i" should have read "8 - i" like in the original Perl.

Third, the "8-$i" in the original Perl points to the null terminator when $i is zero (for a string s that is 8 characters long, s[8] returns the null terminator). So Asc(8-i) when i = 0 needs to return 0, as in my revised version.


ya I was wondering why there was an 8. (this is why im not coding my stuff in perl :S)

CarrierII wrote on Mon, 26 January 2009 09:30

Fourth, a small optimization: since we only ever get to this line

temp = Asc(a) << (Asc(a) And 1) And Asc(v(7 - i))

if Asc(a) And 1 = 1, I replaced the former by the latter.

beautiful! I think I tried that at some point (i didnt paste all 600 attempts :S) but I screwed up on other areas.

CarrierII wrote on Mon, 26 January 2009 09:30

I tested it on some of the strings in your table and it looks to be working.

IT WORKS! Very Happy

CarrierII wrote on Mon, 26 January 2009 09:30

Hope that helps Wink

Immensely.


CarrierII wrote on Mon, 26 January 2009 09:30

CarrierII's brother (ahydra)

Well thank you very much ahydra.

This has to be the toughest thing I have ever attempted to code.

Also thanks much to the following people who helped me and aca20031:
Roshambo
Zack
Dave
Ghostshaw
... I hope I am not forgetting anyone.. if i am... pm me and I will thank you xD


http://img339.imageshack.us/img339/1991/nefobbygenyunoreleasere.jpg
Rene-Buddy | Renegade X
Join the fight against Obsessive-Compulsive Posting Disorder. Cancel is ur friend.
*Renegade X Dev Team Member*

[Updated on: Mon, 26 January 2009 14:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: Ports
Next Topic: Unable to install
Goto Forum:
  


Current Time: Sat Nov 30 14:28:15 MST 2024

Total time taken to generate the page: 0.00642 seconds