17 Nisan 2021 Cumartesi

Digest Crypt Sınıfı

crypto metodu- key
Açıklaması şöyle
Simply use crypto(String key) instead as it already provides random salt.
Örnek
Şöyle yaparız
String hashedPassword = Crypt.crypt(user.getPassword());
crypto metodu - key + salt
Açıklaması şöyle. Mesela SHA-512 kullanılacaksa salt string'i $6$ ile başlar.
The exact algorithm depends on the format of the salt string
Örnek
Şöyle yaparız
String saltBytes = ... ;
String salt = "$6$" + saltBytes;
String hashedPassword = Crypt.crypt(user.getPassword(), salt);

Hiç yorum yok:

Yorum Gönder