[c++ linux] md5

0

Czy ktoś wie może jak użyć md5 na linuxie w c++ .. kombinowałem trochę z openssl ale marnie to wyszło na necie jest 0 przykładów totalnie mi ręce opadają. Może ktoś podać jakiś przykład .. dzięki z góry

0

notka o glibc w:
man 3 crypt</url>

0

A można trochę jaśniej ? :D

0
dawid00 napisał(a)

A można trochę jaśniej ? :D

Nie potrafie niestety opisac funkcji dokladniej niz zostalo to zrobione w dokumentacji, przykro mi...

0

ale przeciez te 3 man crypt to nie jest kodowanie md5

0
dawid00 napisał(a)

ale przeciez te 3 man crypt to nie jest kodowanie md5

Totez dopisalem notka o glibc, masz tam napisane jak zakodowac w md5, blowfish, sha-256, sha-512, a w dodatku mozesz sobie jeszcze posolic to. Standardowo szyfruje DES'em.

0

ok dzieki wszystko jasne .. ale komplikacja w dzialaniach na linuxie dobija mnie .. jestem dzieciem windowsa

0

moze jeszcze to ci sie przyda
http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html

0

Tutaj masz pelny opis. Zapomnialem, ze sobie man posix dogralem i inne.

Glibc Notes

       The glibc2 version of this function supports additional encryption algorithms.

       If salt is a character string starting with the characters "$id$" followed by
       a string terminated by "$":

              $id$salt$encrypted

       then instead of using the DES machine, id identifies the encryption method
       used and this then determines how the rest of the password string is
       interpreted.  The following values of id are supported:

              ID  | Method
              ---------------------------------------------------------
              1   | MD5
              2a  | Blowfish (not in mainline glibc; added in some
                  | Linux distributions)
              5   | SHA-256 (since glibc 2.7)
              6   | SHA-512 (since glibc 2.7)

       So $5$salt$encrypted is an SHA-256 encoded password and $6$salt$encrypted is
       an SHA-512 encoded one.

       "salt" stands for the up to 16 characters following "$id$" in the salt.  The
       encrypted part of the password string is the actual computed password.  The
       size of this string is fixed:

       MD5     | 22 characters
       SHA-256 | 43 characters
       SHA-512 | 86 characters

       The characters in "salt" and "encrypted" are drawn from the set [a-zA-Z0-9./].
       In the MD5 and SHA implementations the entire key is significant (instead of
       only the first 8 bytes in DES).
0

no tak shashowalem ta funkcja .. ale jak ten output ma sie do zwyklego md5 np z php gdzie sa 32 bajty, calklowicie 2 inne outputy

1 użytkowników online, w tym zalogowanych: 0, gości: 1