Şifreli veri üretmek için kullanılır.
using System.Security.Cryptography;
using System.Text;
string hashString = "";
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
SHA1 hasher = SHA1.Create();
string hashedString = Convert.ToBase64String(hasher.ComputeHash(Encoding.GetEncoding("ISO-8859-9").GetBytes(hashString)));
<?php
$hashString = "";
$hashedString = base64_encode(sha1(mb_convert_encoding($hashString, "ISO-8859-9"), true));
?>
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
public class Main {
public static void main(String[] args) throws UnsupportedEncodingException, NoSuchAlgorithmException {
String hashString = "";
MessageDigest digest = MessageDigest.getInstance("SHA-1");
String base64String = Base64.getEncoder().encodeToString(digest.digest(hashString.getBytes("ISO-8859-9")));
}
}
const hashString = "";
const hashedString = await sha1Base64Encoded(hashString);
const crypto = require('crypto');
const iconv = require('iconv-lite');
const hashString = "";
const hashedString = crypto.createHash('sha1').update(iconv.encode(hashString, 'ISO-8859-9')).digest().toString('base64');
import hashlib
import base64
hash_string = "";
hashed_string = base64.b64encode(hashlib.sha1(hash_string.encode('ISO-8859-9')).digest())
package main
import (
"crypto/sha1"
"encoding/base64"
"fmt"
"golang.org/x/text/encoding/charmap"
)
func main() {
hashString := ""
encoder := charmap.ISO8859_9.NewEncoder()
encodedString, err := encoder.String(hashString)
if err != nil {
fmt.Println("Hata:", err)
return
}
sha1Hash := sha1.New()
sha1Hash.Write([]byte(encodedString))
sha1Bytes := sha1Hash.Sum(nil)
base64String := base64.StdEncoding.EncodeToString(sha1Bytes)
}
Imports System.Security.Cryptography
Imports System.Text
Module ParamHashModule
Sub Main()
Dim hashString As String = ""
Dim hasher As SHA1 = SHA1.Create()
Dim hashedString As String = Convert.ToBase64String(hasher.ComputeHash(Encoding.GetEncoding("ISO-8859-9").GetBytes(hashString)))
End Sub
End Module
Hash Output:
Parametre | Zorunlu | Tip | Uzunluk | Açıklama |
---|---|---|---|---|
Data | Evet | String | - | Şifrelenecek Veri |
Parametre | Tip | Uzunluk | Açıklama |
---|---|---|---|
SHA2B64Result | String | - | İşlem Sonucu |