SHA2B64

Metot Adı: SHA2B64

Ş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);
Gereksinimler
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
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body>
<SHA2B64 xmlns="https://turkpos.com.tr/">
<Data>107380c13d406-873b-403b-9c09-a5766840d98c1100,00100,00sipariş1http://localhost:62 317/turkpos.api/sonuc.aspxhttp://localhost:62317/turk pos.api/sonuc.aspx</Data>
</SHA2B64>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SHA2B64Response xmlns="https://turkpos.com.tr/">
<SHA2B64Result>HiI3vTyT31NC1pLlhItiMo3UiHg=</SHA2B64Result>
</SHA2B64Response>
</soap:Body>
</soap:Envelope>