This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <openssl/sha.h> // OpenSSL'in SHA fonksiyonları için gerekli başlık dosyası | |
// Fonksiyon, verilen bir metnin SHA-256 özetini hesaplar ve ekrana basar. | |
void print_sha256_digest(const char *text) { | |
// SHA-256 özeti her zaman 32 byte (256 bit) uzunluğundadır. | |
// Bu özeti saklamak için bir dizi (array) oluşturuyoruz. | |
unsigned char hash[SHA256_DIGEST_LENGTH]; |