crypto: accumulative hashing API
authorAlejandro Zeise <alejandro.zeise@seagate.com>
Tue, 8 Oct 2024 07:57:08 +0000 (09:57 +0200)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 10 Oct 2024 11:32:59 +0000 (12:32 +0100)
commit190feb488473ca07df17dfa6fbc073a407258923
treeb0d8ec7d45da04340e1eca5bdae7ed465f76c0b2
parent838fc0a8769d7cc6edfe50451ba4e3368395f5c1
crypto: accumulative hashing API

Changes the hash API to support accumulative hashing.
Hash objects are created with "qcrypto_hash_new",
updated with data with "qcrypto_hash_update", and
the hash obtained with "qcrypto_hash_finalize".

These changes bring the hashing API more in line with the
hmac API.

Signed-off-by: Alejandro Zeise <alejandro.zeise@seagate.com>
[ clg: - Changed documentation "non-zero on error" -> "-1 on error" ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
crypto/hashpriv.h
include/crypto/hash.h