Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: control mouse and keyboard of remote machine. Pin
sanforjackass17-Feb-10 20:40
sanforjackass17-Feb-10 20:40 
AnswerRe: control mouse and keyboard of remote machine. Pin
Dave Kreskowiak17-Feb-10 3:20
mveDave Kreskowiak17-Feb-10 3:20 
AnswerRe: control mouse and keyboard of remote machine. Pin
sksaininet25-Dec-10 20:02
sksaininet25-Dec-10 20:02 
Questionnet use [modified] Pin
arsendem17-Feb-10 1:31
arsendem17-Feb-10 1:31 
AnswerRe: net use Pin
OriginalGriff17-Feb-10 1:35
mveOriginalGriff17-Feb-10 1:35 
GeneralRe: net use Pin
hammerstein0517-Feb-10 1:36
hammerstein0517-Feb-10 1:36 
AnswerRe: net use Pin
hammerstein0517-Feb-10 1:35
hammerstein0517-Feb-10 1:35 
QuestionC++ to CSharp Pin
Xmen Real 17-Feb-10 1:11
professional Xmen Real 17-Feb-10 1:11 
I found a code for calculating CRC, but it was in C++

unsigned int CRC32(char* text)
{
	size_t textLen = strlen(text);
	int i = 0;
	unsigned int retHash = 0;
	if(text[0] == '"')
		i = 1;
	for(i;i<textLen;i++)
	{
		char ctext = textLen[i];
		if(ctext == '"')
			break;
		if(ctext - 65 > 25)
		{
			if(ctext == '\\')
				ctext = '/';
		}
		else ctext += 32;
		retHash = (1025 * (retHash + ctext) >> 6) ^ 1025 * (retHash + ctext);
	}
	return 32769 * (9 * retHash ^ (9 * retHash >> 11));
}



public static uint CRCRC(string text)
{
    uint retHash = 0;


    for (int a = 0; a < text.Length; a++)
    {
        char ctext = text[a];
        if (ctext == '"')
            break;
        if (ctext - 65 > 25)
        {
            if (ctext == '\\')
                ctext = '/';
        }
        else
            ctext = (char)(ctext + 32);
        retHash = (1025 * ((retHash + ctext) >> 6)) ^ 1025 * (retHash + ctext);
    }

    return 32769 * (9 * retHash ^ (9 * (retHash >> 11)));
}




so I converted it manually to C# but the result is not as expected. May be I did something wrong in converting...


TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia>

-----------------------------------------------
128 bit encrypted signature, crack if you can

AnswerRe: C++ to CSharp Pin
Covean17-Feb-10 1:28
Covean17-Feb-10 1:28 
AnswerRe: C++ to CSharp Pin
hammerstein0517-Feb-10 1:29
hammerstein0517-Feb-10 1:29 
AnswerRe: C++ to CSharp Pin
OriginalGriff17-Feb-10 1:32
mveOriginalGriff17-Feb-10 1:32 
GeneralRe: C++ to CSharp [modified] Pin
Xmen Real 17-Feb-10 1:36
professional Xmen Real 17-Feb-10 1:36 
GeneralRe: C++ to CSharp Pin
hammerstein0517-Feb-10 1:41
hammerstein0517-Feb-10 1:41 
GeneralRe: C++ to CSharp Pin
OriginalGriff17-Feb-10 1:42
mveOriginalGriff17-Feb-10 1:42 
GeneralRe: C++ to CSharp [modified] Pin
Xmen Real 17-Feb-10 1:49
professional Xmen Real 17-Feb-10 1:49 
GeneralRe: C++ to CSharp Pin
OriginalGriff17-Feb-10 3:11
mveOriginalGriff17-Feb-10 3:11 
GeneralRe: C++ to CSharp Pin
Xmen Real 17-Feb-10 3:17
professional Xmen Real 17-Feb-10 3:17 
GeneralRe: C++ to CSharp Pin
OriginalGriff17-Feb-10 3:32
mveOriginalGriff17-Feb-10 3:32 
GeneralRe: C++ to CSharp Pin
Xmen Real 17-Feb-10 15:46
professional Xmen Real 17-Feb-10 15:46 
GeneralRe: C++ to CSharp [modified] Pin
OriginalGriff17-Feb-10 22:11
mveOriginalGriff17-Feb-10 22:11 
GeneralRe: C++ to CSharp Pin
Xmen Real 18-Feb-10 2:16
professional Xmen Real 18-Feb-10 2:16 
GeneralRe: C++ to CSharp Pin
OriginalGriff18-Feb-10 2:30
mveOriginalGriff18-Feb-10 2:30 
GeneralRe: C++ to CSharp Pin
Xmen Real 18-Feb-10 2:33
professional Xmen Real 18-Feb-10 2:33 
AnswerRe: C++ to CSharp Pin
Richard MacCutchan17-Feb-10 3:13
mveRichard MacCutchan17-Feb-10 3:13 
AnswerRe: C++ to CSharp Pin
Saksida Bojan17-Feb-10 3:26
Saksida Bojan17-Feb-10 3:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.