A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 113

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 280

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 145

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 223

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 303

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 344

A PHP Error was encountered

Severity: 8192

Message: setcookie(): Passing null to parameter #7 ($httponly) of type bool is deprecated

Filename: core/Input.php

Line Number: 410

md5() ile Şifreleme Yapmak
Öneri ve Hata Raporu



Günün Sözü Sevemez kimse seni benim sevdiğim kadar

kategori PHP
oylama 3/5 yorum 0 yorum yazar Hakan Taşan tarih 08 Kasım 2013

md5() fonksiyonu ile string şifrelemeyi öğreneceğiz. MD5 (Message-Digest Algorithm), 1991 yılında Ron Rivest tarafından geliştirilmiş tek yönlü bir şifreleme algoritmasıdır. Bu fonksiyona giriş yapılan stringin çıkışı 16'lık (Hexadecimal) sayı sisteminde 128 bitlik veridir. md5() fonksiyonu çoğunlukla üye şifrelerini veritabanında güvenli olarak saklamak için kullanılır. MD5 konsepti baz alınarak geliştirilen md5_file() fonksiyonu ile de dosyaların bozulup bozulmadığı kontrol edilebilir. Örnek olarak bir dosya indirdiğimizde MD5 algoritmasından elde ettiğimiz sonuç ile dosyanın orijinal MD5 sonucu eşitse, dosyayı eksiksiz indirmişiz demektir. MD5'e alternatif olarak SHA-1 ve RIPEMD-160 algoritmaları da vardır.

Örnek Kod

<?php
    $str = "Haydi Gençler";
    echo md5($str);
    // Çıktı: 3a1b7da023a0db0e9a8dd7f5f651479a
?>

 

paylaş Paylaş
oylama yap Oyla

makale yorumları YORUMLAR

Bu makale için yorum yazılmamış