From: brian m. carlson Date: Sun, 15 Jan 2017 21:36:33 +0000 (+0000) Subject: Add SHA-256 and SHA-512 hashes X-Git-Tag: v0.28.1~12 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=fd166a511adc0f222f365d61252c0a32a78ebcdf Add SHA-256 and SHA-512 hashes Most security-conscious users expect to find SHA-256 hashes of files, since both MD5 and SHA-1 are considered weak. SHA-512 additionally has the benefit that it is significantly faster than SHA-256 on 64-bit systems, processing twice as much data per chunk with only 125% of the operations. Generate both SHA-256 and SHA-512 hashes anywhere we provide SHA-1 hashes. --- diff --git a/grml-live b/grml-live index d9620d0..4093eb4 100755 --- a/grml-live +++ b/grml-live @@ -1440,6 +1440,10 @@ else touch -r ${ISO_NAME} ${ISO_NAME}.md5 sha1sum ${ISO_NAME} > ${ISO_NAME}.sha1 && \ touch -r ${ISO_NAME} ${ISO_NAME}.sha1 + sha256sum ${ISO_NAME} ${ISO_NAME}.sha256 && \ + touch -r ${ISO_NAME} ${ISO_NAME}.sha256 + sha512sum ${ISO_NAME} ${ISO_NAME}.sha512 && \ + touch -r ${ISO_NAME} ${ISO_NAME}.sha512 fi ) ;; @@ -1520,6 +1524,8 @@ create_netbootpackage() { ( cd $(dirname "${OUTPUT_FILE}") sha1sum $(basename "${OUTPUT_FILE}") > "${OUTPUT_FILE}.sha1" + sha256sum $(basename "${OUTPUT_FILE}") > "${OUTPUT_FILE}.sha256" + sha512sum $(basename "${OUTPUT_FILE}") > "${OUTPUT_FILE}.sha512" ) einfo "Generated netboot package ${OUTPUT_FILE}" ; eend 0 rm -rf "${OUTPUTDIR}"