From a5314a2ff4cb503ff41da13ffd0e907f49ee4009 Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Sat, 7 May 2016 14:40:25 +0000 Subject: Deprecate get_sha1() in Pomf 2.1.0 There are two issues with get_sha1(): - The function name doesn't follow the PSR-2 coding style guide for function naming, followed in Pomf since version 2.0.0. - SHA-1 is no longer considered resilient to collisions, versus SHA-256. In current plans, this feature is to be replaced with getHash() or similar function name in the next major version (Pomf 3.0.0). For consideration for future SHA-256 hashing implementation, the MySQL schema's hash value needs to be changed from char(40) to char(64) to accommodate the longer SHA-256 length of 64 bytes in hexadecimal string. --- static/classes/UploadedFile.class.php | 1 + 1 file changed, 1 insertion(+) (limited to 'static/classes') diff --git a/static/classes/UploadedFile.class.php b/static/classes/UploadedFile.class.php index ac39646..99020ce 100644 --- a/static/classes/UploadedFile.class.php +++ b/static/classes/UploadedFile.class.php @@ -37,6 +37,7 @@ class UploadedFile /** * Generates the SHA1 or returns the cached SHA1 hash for the file. * + * @deprecated 2.1.0 To be replaced with SHA-256 hashing. * @return string */ public function get_sha1() -- cgit v1.2.3