Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters

Reply
 
Thread Tools

CODER & DECODER
Old 27.07.2002, 03:01   #1
Студент
 
Join Date: 05 2002
Location: Armenia
Posts: 276
Rep Power: 0
Post CODER & DECODER

OV MI HAT HESHT U (CANKALI A KARCH) DZEV KASI BARERI KODAVORUM LYUBOY SIMVOLNEROV EV HET BERMAN CRAGIR ?
Orinak graca
acid.land.am
senc ban lini motavorapes
&er${9:l|[sm

P.S. C++ -um MAKE DIR VONC EN ANUM ? (EXAMPLE GREQ PLZ)

Old 27.07.2002, 05:34   #2
Студент
 
Join Date: 06 2002
Location: Yerevan
Posts: 258
Rep Power: 0
Post

Petar anum es XOR (in cpp - operator ^ )
Erku angam XOR-y beruma nachal'nyj vichaki, itogo du yntrum es password iran hash anum, kam prosto krknum irar hetevic, u tar ar tar xor anum, that's it. Code ev decode functionnery klinen identik.
Code:
for ( int i = 0; i < stringLen; i++ )  {
    newString[ i ] = oldString[ i ] ^ password[ i % passwordLen ];
}

Old 27.07.2002, 05:47   #3
Студент
 
Join Date: 05 2002
Location: Armenia
Posts: 276
Rep Power: 0
Lightbulb

Code:
for ( int i = 0; i < stringLen; i++ )
{newString[ i ] = oldString[ i ] ^ password[ i % passwordLen ];}
// Incha nshanakum ^password[i%passwordLen]
//Inch der a xaxum ?

Old 27.07.2002, 05:49   #4
Студент
 
Join Date: 05 2002
Location: Armenia
Posts: 276
Rep Power: 0
Post

ev heto
es Borland C++ Builder ov em uzum porcem u vorosh baner tarbervum en Visualic
Chem karoxanum Borlandum stringLen@ gtnel ete karas asa

Thnx

Old 27.07.2002, 12:21   #5
Студент
 
Join Date: 06 2002
Location: Yerevan
Posts: 258
Rep Power: 0
Post

^ - bitwise xor operator.
Borlandum ete T-classeric es ogtagorcum, chgitem (bajc lookup smth like getlenght, length or smth similar).

P.S. Xor - 1^1=0, 1^0=1, 0^1=1, 0^0=0
Reply




Реклама:
реклама

All times are GMT. The time now is 02:00.
Top

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.