![]() |
|
SHA-512 algoritması ile base64 encode edilmesi - Baskı Önizleme +- Delphi Can (https://www.delphican.com) +-- Forum: Delphi (https://www.delphican.com/forumdisplay.php?fid=3) +--- Forum: Genel Programlama (https://www.delphican.com/forumdisplay.php?fid=6) +--- Konu Başlığı: SHA-512 algoritması ile base64 encode edilmesi (/showthread.php?tid=8071) |
SHA-512 algoritması ile base64 encode edilmesi - commsense - 26-02-2025 Merhaba; Bir banka ile yapılan entegrasyonda SHA-512 algoritması ile base64 encode edilmesi istenmektedir. Bankanın örneklerinden aldığım sonuçları Delphi XE 10.4 de nasıl elde edebilirim. C# örneği String hashVal = "1234"; System.Security.Cryptography.SHA512 sha = new System.Security.Cryptography.SHA512CryptoServiceProvider(); byte[] hashbytes = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(hashVal); byte[] inputbytes = sha.ComputeHash(hashbytes); String hashValue = System.Convert.ToBase64String(inputbytes); string result = hash; Örneklerle "1234" için aldığım sonuc: 1ARVn2Auq2/WAqx2gNrL+q3RNjAzXpUfCXrzkA6d4Xa22yhRLy4AC50E+6UTPoscbo31nbOoq51gvkuXzJ6B2w== Delphi ile aynı sonucu alamadığım için c# ile dll oluşturup Delphi Projesinde dll yi kullanarak geçici çözüm sağladım. Delphi projesi içinde nasıl yapacağım konusunda bilgilerinize ihtiyacım var. SHA-512 algoritması ile base64 encode edilmesi - engerex - 26-02-2025 3. taraf kütüphaneye gerek olmadan. uses System.Hash, System.NetEncoding; function SHA512Base64(const AText: string): string; begin Result := TNetEncoding.Base64.EncodeBytesToString( THashSHA2.GetHashBytes(AText, SHA512) ); end; Cvp: SHA-512 algoritması ile base64 encode edilmesi - commsense - 04-03-2025 (26-02-2025, Saat: 18:36)engerex Adlı Kullanıcıdan Alıntı: 3. taraf kütüphaneye gerek olmadan. Teşekkür ederim, bu işimi oldukça rahatlattı. Kolaylıklar dilerim. |