Salut pana acum folosesc pentru criptarea parolelor bcrypt din php si din programelele din c# folosesc o librarie, intrebarea mea se merita aceasta metoda? ca mie sa nu mai fie libraria disponibila.
Daca aveti sugestii cu o metoda mai eficienta, chiar va rog, sa luam in calcul acele care au coleziuni gen md5
Alegere metoda criptare
Moderators: Moderatori ajutatori, Moderatori
- sergiu4995
- Membru eXtream
- Posts: 2052
- Joined: 08 Oct 2011, 21:05
- Detinator Steam: Da
- Has thanked: 31 times
- Been thanked: 17 times
- Contact:
-
- Fost administrator
- Posts: 13707
- Joined: 09 Oct 2010, 12:39
- Detinator Steam: Da
- CS Status: In grajd!
- SteamID: kalulord
- Reputatie: Fost Administrator
Fost membru Club eXtreamCS (6 luni)
Nume anterior: Terra - Location: Romania, Ploiesti
- Has thanked: 328 times
- Been thanked: 646 times
- Contact:
https://github.com/phpseclib/phpseclib/ ... jndael.php
C# decrypt ()
C# decrypt ()
Code: Select all
private string decyptInit(string toBeDecrypted, string key, string initVector)
{
var keyByte = Encoding.Default.GetBytes(key);
var decodedIV = Base64Decode(initVector);
var iv = Encoding.Default.GetBytes(decodedIV);
var rijndael = new RijndaelManaged
{
BlockSize = 128,
IV = iv,
KeySize = 192,
Key = keyByte
};
var buffer = Convert.FromBase64String(toBeDecrypted);
var transform = rijndael.CreateDecryptor();
string decrypted;
using (var ms = new MemoryStream())
{
using (var cs = new CryptoStream(ms, transform, CryptoStreamMode.Write))
{
cs.Write(buffer, 0, buffer.Length);
cs.FlushFinalBlock();
decrypted = Encoding.UTF8.GetString(ms.ToArray());
cs.Close();
}
ms.Close();
}
return decrypted;
} public static string Base64Decode(string base64EncodedData)
{
var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
}
- sergiu4995
- Membru eXtream
- Posts: 2052
- Joined: 08 Oct 2011, 21:05
- Detinator Steam: Da
- Has thanked: 31 times
- Been thanked: 17 times
- Contact:
Ms, dar ideea e ca se merita de stat la bcrypt? e eficient sau sunt mai bune la care ati testat voi
- ericsp
- Membru, skill +1
- Posts: 284
- Joined: 11 Jan 2015, 13:08
- Detinator Steam: Da
- SteamID: getmesomedonuts
- Reputatie: Manager bhop.eXtreamCS.com
- Fond eXtream: 0
- Has thanked: 5 times
- Been thanked: 4 times
Foloseste SHA256 pentru tot, peste tot
sursa-sunt programator
sursa-sunt programator
BHOP.HOWL.RO | !WS !KNIFE !BATTLEPASS | 102.4 TICK | #1 IN ROMANIA
- NIGHTHAWK
- Membru, skill +1
- Posts: 475
- Joined: 10 Jul 2017, 21:58
- Detinator Steam: Da
- CS Status: Full stack dev
- SteamID: nighthawkk
- Fond eXtream: 0
- Location: Iasi
- Has thanked: 3 times
- Been thanked: 3 times
Nu folosi niciodata sha256 sau md5 pentru parole, nu trebuie sa ma asculti pe mine sau pe cineva de pe un forum de cs :)) intreaba pe stackoverflow si vei gasi un raspuns potrivit .
Personal iti recomand sa folosesti bcrypt in continuare.
Personal iti recomand sa folosesti bcrypt in continuare.
- zigweed
- Membru, skill +3
- Posts: 1094
- Joined: 27 Oct 2015, 16:35
- Detinator Steam: Da
- SteamID: zshare
- Reputatie: Fost Membru Club eXtreamCS ( o luna )
- Fond eXtream: 0
- Location: Bucuresti
- Has thanked: 2 times
- Been thanked: 13 times
- Contact:
Pana si Laravel foloseste Bcrypt sau Argon2 pentru hashing: https://laravel.com/docs/8.x/hashing#introduction
Si eu tot Bcrypt iti recomand.
Si eu tot Bcrypt iti recomand.
Am ras.
- sergiu4995
- Membru eXtream
- Posts: 2052
- Joined: 08 Oct 2011, 21:05
- Detinator Steam: Da
- Has thanked: 31 times
- Been thanked: 17 times
- Contact:
bcrypt ramane thx all, stackoverflow nu-l folosesc ca acolo sunt numai pseudo programatori aka cristian dascalu & petrut astia din ro
-
- Information
-
Who is online
Users browsing this forum: Bing [Bot], Petal [Bot], Yandex [Bot] and 423 guests