Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> szyfrowanie RC4, a klucz mieszany przez sha1
Cathan
post
Post #1





Grupa: Zarejestrowani
Postów: 24
Pomógł: 0
Dołączył: 21.04.2005

Ostrzeżenie: (0%)
-----


Witam
Mam pytanie.
Musze zaszyfrowac string za pomoca RC4 - i nie bylo by tak zle, gdyby nie fakt - iz klucz jest szyfrowany sha1. php zwraca problem z dlugośćią stringa - sha daje 40 obslugiwany jest 32

a na php.net jestraczej srednia rada
Cytat
Avoid using string representations hashes - md5() or sha1() - because hex encoding uses a set of only 16 characters [0-9a-f], which is equivalent to 4 bits, and thus halve the strength of your encryption: 4 x 32 = 128-bit.


a koniecznie klucz musi byc szyfrowany przez sha1

Jak rozwiazać taki problem??
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Cathan
post
Post #2





Grupa: Zarejestrowani
Postów: 24
Pomógł: 0
Dołączył: 21.04.2005

Ostrzeżenie: (0%)
-----


Dla zainteresownaych - info

DLEPHI ZWRACA CO INNEGO NIZ php

(IMG:http://forum.php.pl/style_emoticons/default/sadsmiley02.gif)

porazka

orson - teoretycznie tak, ale w praktyce php wali komunikatem:

Warning: mcrypt_generic_init() [function.mcrypt-generic-init]: Key size too large; supplied length: 40, max: 32 in

Natomiast w delphi wszystko jest ok.
Moral z tego taki - nie da sie dobrac do wpisow w bazie kodowanych przez delphi - a bynajmniej mnie ten temat przerosl (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)

Ten post edytował Cathan 11.07.2005, 12:36:55
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 27.12.2025 - 12:01