gpg: use iobuf_read for higher detached signing speed
* g10/sign.c (sign_file): Use iobuf_read instead of iobuf_get for reading data from detached file.
This patch reduces iobuf_read per byte processing overhead and speeds
up detached signing.
Detached signing speed on AMD Ryzen 5800X (4.3GiB file, SHA256):
gpg process user time
after: 1.898s (2.0x faster)
Numbers above are given for the version in master but should be
similar for here (2.2).
- GnuPG-bug-id: T5826
- Signed-off-by: Jussi Kivilinna <firstname.lastname@example.org>