Grey_Wolf Posted June 14, 2007 Report Share Posted June 14, 2007 (edited) Vai kaads ir saskaaries ar Datu shifreeshanu desifreeshanu ? Izmantojot TIKAI php 5 standartfunkcijas (vai funkcijas kuras buutu aktivizeetas vismaz 80% hostingos) ---- Probleema: ir kautkaadi dati: -> $text.... ir atsleega: --> $keys Vajag, ko liidziigu.... $aa=sifreejam($text, $keys); echo Desifreejam($aa,$keys); ---------- Kaada ir pieredz sajaa jautaajumaa? Papeetiju manuaali ir vairaakas metodes , bet iisti neesmu parliecinaats par to ka Hosteetaajs vinjas atbalstiis (itkaa atseviskji modulji).... Tieshi taadeelj arii jautaaju par pieredzi.... P.S. Velreiz atkartoshos man vajag ABOS virzienos... (zinot ka savaadaak buus noraades uz MD5 ;) ) Edited June 14, 2007 by Grey_Wolf Link to comment Share on other sites More sharing options...
black Posted June 14, 2007 Report Share Posted June 14, 2007 AES (128 bitu versija) neder? http://www.phpclasses.org/browse/package/3650.html Link to comment Share on other sites More sharing options...
bubu Posted June 14, 2007 Report Share Posted June 14, 2007 Un ja AES-128 (vai labāk, tb drošāk, AES-256) ir par lēnu, tad The Tiny Encryption Algorithm. Ļoti vienkāršs (koda ziņā) simetrisks kriptēšanas algoritms. Link to comment Share on other sites More sharing options...
Val Posted June 14, 2007 Report Share Posted June 14, 2007 (edited) bubu iedotais links rullē. :) adresi vajadzēja aiz url= un aprakstu starp tagiem... Edited June 15, 2007 by Val Link to comment Share on other sites More sharing options...
Grey_Wolf Posted June 15, 2007 Author Report Share Posted June 15, 2007 Kaadas vel idejas? AES-128 vareetu dereet , beet baidos ka pie palielaaka text apstraades vareetu iestaaties zinaamas bremzes :( Un veel probleema ka UTF-8 formaataa var padot tikai 8 simbolus (ja vissi ir Miikstie/garie)..... tas algoritms nesanaak paaraak smukss... Varbuut kaads Ir saskaries ar shaadu probleemu --> tas sifreeshanas algoritms var arii nebuut Baigi Kruts.... (Ljoti liela sekyriti nav nepiecieshama .... galvenais lai Bez Usera Keya nevareetu viegli desifreet....) Link to comment Share on other sites More sharing options...
bubu Posted June 15, 2007 Report Share Posted June 15, 2007 Ņem to TEA un šifrē stringu pa baitiem (pofig par utf-8). Atšifrējot baitus jau iegūsi tādu pašu stringu kā oriģinālo. TEA ir ātrs. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted June 15, 2007 Author Report Share Posted June 15, 2007 bubu --> droshi vien taa arii dariishu... Lielos vilcienos probleemu atrisinaaju, nedomaaju ka Optimaalakais variants , bet nu straadaa. pagaidaam izmantoju to pashu black iedoto linku... Risinaajums iisumaa bija saads (kaa jau mineeju tas NAV pats optimaalaakais varints): --- kodeeshana --- Stringu parkonverteejam par 7bitu simbolu virkni ->convert_uuencode() sadalam pa baitiem ->str_split($text2,16) izlaizam ieguuto masiivu caur Ciklu un noscriptojam tos fragmentus pieliekot ADALIITAAJU kas ir pietiekami garsh lai praktiski taada kombinaacijaa netkartotos --> $ct=$ct.'AADALIITAAJSA'.$aes->blockEncrypt($arr1[$i], $key); -- dekodeshana --- sadalam peec Adaliitaaja atpakalj fragmentos -->explode("AADALIITAAJSA",$ct); novaacam 1 masiiva elementu -> array_shift($arr2); // sito laikam nevajag ja atdaliitaajs ir beigaas izlaizam masiivu caur ciklu un desifreejam -->$aes->blockDecrypt($arr2[$i],$key); samerdzojam masiivu un parkonverteejam 7bitu stringu (katrs simbols nevis viss strings ;) ) -->convert_uudecode(implode("", $arr3)); ---------------- Viss sitais der praktiski jebkuram scripterim/descripterim...... P.S. idejas pasmeelos no Ineta ;) sekojot bubu linkam .... Link to comment Share on other sites More sharing options...
blackhalt Posted June 15, 2007 Report Share Posted June 15, 2007 http://paste.php.lv/5671/nonum Link to comment Share on other sites More sharing options...
Recommended Posts