gnupg: Scdaemon PKSIGN
6.6.5 Signing data with a Smartcard
-----------------------------------
To sign some data the caller should use the command
SETDATA HEXSTRING
to tell 'scdaemon' about the data to be signed. The data must be
given in hex notation. The actual signing is done using the command
PKSIGN KEYID
where KEYID is the hexified ID of the key to be used. The key id may
have been retrieved using the command 'LEARN'. If another hash
algorithm than SHA-1 is used, that algorithm may be given like:
PKSIGN --hash=ALGONAME KEYID
With ALGONAME are one of 'sha1', 'rmd160' or 'md5'.