Armenian Knowledge Base  

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

Reply
 
LinkBack Thread Tools
Old 27.07.2002, 04:01   #1
Студент
 
Join Date: 05 2002
Location: Armenia
Posts: 276
Downloads: 0
Uploads: 0
Reputation: 0 | 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)
Reply With Quote
Old 27.07.2002, 06:34   #2
Студент
 
Join Date: 06 2002
Location: Yerevan
Posts: 258
Downloads: 0
Uploads: 0
Reputation: 0 | 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 ];
}
Reply With Quote
Old 27.07.2002, 06:47   #3
Студент
 
Join Date: 05 2002
Location: Armenia
Posts: 276
Downloads: 0
Uploads: 0
Reputation: 0 | 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 ?
Reply With Quote
Old 27.07.2002, 06:49   #4
Студент
 
Join Date: 05 2002
Location: Armenia
Posts: 276
Downloads: 0
Uploads: 0
Reputation: 0 | 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
Reply With Quote
Old 27.07.2002, 13:21   #5
Студент
 
Join Date: 06 2002
Location: Yerevan
Posts: 258
Downloads: 0
Uploads: 0
Reputation: 0 | 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 With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 11:25.


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