{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"gnupg: discover hash algorithm used for signature","author_name":"Christian Weiske","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/219 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"219\">\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  <div class=\"code\"><pre class=\"txt\">...\r\n\r\ntypedef enum\r\n  {\r\n    DIGEST_ALGO_MD5         =  1,\r\n    DIGEST_ALGO_SHA1        =  2,\r\n    DIGEST_ALGO_RMD160      =  3,\r\n    \/* 4, 5, 6, and 7 are reserved. *\/\r\n    DIGEST_ALGO_SHA256      =  8,\r\n    DIGEST_ALGO_SHA384      =  9,\r\n    DIGEST_ALGO_SHA512      = 10,\r\n    DIGEST_ALGO_SHA224      = 11\r\n  }\r\ndigest_algo_t;\r\n\r\n...<\/pre><\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/219\/rev-raw\/2b96e7ac3371c8b8f63f3429c9bfdac4490287ba\/gnupg-common-openpgpdefs.txt\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/219#gnupg-common-openpgpdefs.txt\">gnupg-common-openpgpdefs.txt<\/a>\n <\/div>\n<\/div>\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  <div class=\"code\"><pre class=\"txt\">$ echo foo | gpg --detach-sign --armor | LC_ALL=C gpg --list-packets --verbose\r\n\r\ngpg: armor header: Version: GnuPG v1\r\n:signature packet: algo 17, keyid 14C85A0824EAF823\r\n\tversion 4, created 1440053810, md5len 0, sigclass 0x00\r\n\tdigest algo 2, begin of digest 59 54\r\n\thashed subpkt 2 len 4 (sig created 2015-08-20)\r\n\tsubpkt 16 len 8 (issuer key ID 14C85A0824EAF823)\r\n\tdata: [160 bits]\r\n\tdata: [158 bits]\r\n<\/pre><\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/219\/rev-raw\/2b96e7ac3371c8b8f63f3429c9bfdac4490287ba\/phork0.txt\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/219#phork0.txt\">phork0.txt<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
