Aller au contenu

Mihawk

Modérateur spécialisé
  • Compteur de contenus

    103
  • Inscription

  • Dernière visite

  • Days Won

    6

Community Answers

  1. Mihawk's post in Conversion en SHA-256 was marked as the answer   
    Re ! 
    Désolé du double post..
     
    Finalement j'ai trouvé alors voilà la solution ! (il fallait un encodage utf8...)
    public static String sha256_hash(String value) { StringBuilder Sb = new StringBuilder(); using (SHA256 hash = SHA256Managed.Create()) { Encoding enc = Encoding.UTF8; Byte[] result = hash.ComputeHash(enc.GetBytes(value)); foreach (Byte b in result) Sb.Append(b.ToString("x2")); } return Sb.ToString(); } Désolé du dérangement ! ^^
×
×
  • Créer...