Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[etwas OT] Seltsames md5sum
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Robelix
l33t
l33t


Joined: 21 Jul 2002
Posts: 760
Location: in a World created by a Flying Spaghetti Monster

PostPosted: Tue Nov 30, 2004 11:55 am    Post subject: [etwas OT] Seltsames md5sum Reply with quote

Mir ist gerade seltsames untergekommen: Mit dem commandline md5sum bekomme ich andere hashes als in php oder mysql:
Code:
$ echo 'blabla' | md5sum
9b36b2e89df94bc458d629499d38cf86  -
$ php -a
Interactive mode enabled

<? echo md5('blabla'); ?>
df5ea29924d39c3be8785734f13169c6

$ mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.21

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select md5('blabla');
+----------------------------------+
| md5('blabla')                    |
+----------------------------------+
| df5ea29924d39c3be8785734f13169c6 |
+----------------------------------+
1 row in set (0.09 sec)

Übersehe ich da irgendwas? MD5 sollte doch gleich MD5 sein - egal in welchem Programm, oder?

Robelix
_________________
mysql> SELECT question FROM life, universe, everything WHERE answer=42;
Empty set (2079460347 sec)
Back to top
View user's profile Send private message
ohoiza
n00b
n00b


Joined: 31 Aug 2003
Posts: 45
Location: l0wer bavaria

PostPosted: Tue Nov 30, 2004 2:00 pm    Post subject: Reply with quote

liegt wohl dran, dass echo an das 'blabla' hinten noch ein newline anfügt.
Back to top
View user's profile Send private message
Robelix
l33t
l33t


Joined: 21 Jul 2002
Posts: 760
Location: in a World created by a Flying Spaghetti Monster

PostPosted: Tue Nov 30, 2004 2:09 pm    Post subject: Reply with quote

ja klar... danke, wenn ich mal auf der Leitung steh' dann find' ich oft nicht so schnell wieder runter :)

Code:
$ echo -n 'blabla' | md5sum
df5ea29924d39c3be8785734f13169c6  -

_________________
mysql> SELECT question FROM life, universe, everything WHERE answer=42;
Empty set (2079460347 sec)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum