FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Como essa function para xharbour y fwh.
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Como essa function para xharbour y fwh.
Posted: Thu Oct 22, 2009 02:28 AM
Code (fw): Select all Collapse
Private String geraHash(String Arquivo)
{
 String HashGerado;
 ASCIIEncoding textConverter = newASCIIEncoding();
 MD5CryptoServiceProvider Md5Provider = new MD5CryptoServiceProvider();
 Byte[] ArquivoByte;
 Arquivo = Arquivo.Replace("\r","").Replace("\n","").Replace("\t","");
 ArquivoByte = textConverter.GetBytes(Arquivo);
 ArquivoByte = Md5Provider.ComputerHash(ArquivoByte);
 HashGerado  = ToHexString(ArquivoByte);
 return HashGerado;
}

Continue the discussion