Jump to content
Fórum Script Brasil
  • 0

Criptografia PBKDF2 me tirando o sono, me ajudem


Wiuu
 Share

Question

Pessoal bom dia, estou num projeto neste momento onde se faz necessário a conversão dessa classe em c# para PHP estou a dias quebrando a cabeça e decidi pedir ajuda aqui:

public class PBKDF2
{
public static void Run()
{
var password = "password";
var salt = "ALEATORIO-PARACADA-SENHA";
int iterations = 3000;
int HashBits = 128;

var crypt = new Rfc2898DeriveBytes(password, Convert.FromBase64String(salt), iterations);
var hash = Convert.ToBase64String(crypt.GetBytes(HashBits / 8));

Console.WriteLine("Base64 result: {0}", hash);
Console.ReadKey();
}
}

eu fiz diversas classes e tipo não importa como, nenhuma das hash geradas batem com as do php.

alguém poderia me ajudar?! pelo amor de deus?!

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.2k
×
×
  • Create New...