summaryrefslogtreecommitdiffstats
path: root/crypto/hash-glib.c
Commit message (Collapse)AuthorAgeFilesLines
* crypto: hash: add hash driver frameworkLongpeng(Mike)2017-07-191-6/+13
| | | | | | | | | | | | 1) makes the public APIs in hash-nettle/gcrypt/glib static, and rename them with "nettle/gcrypt/glib" prefix. 2) introduces hash framework, including QCryptoHashDriver and new public APIs. Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* crypto: don't open-code qcrypto_hash_supportsDaniel P. Berrange2016-07-211-2/+1Star
| | | | | | | Call the existing qcrypto_hash_supports method from qcrypto_hash_bytesv instead of open-coding it again. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* crypto: use glib as fallback for hash algorithmDaniel P. Berrange2016-07-211-0/+98
GLib >= 2.16 provides GChecksum API which is good enough for md5, sha1, sha256 and sha512. Use this as a final fallback if neither nettle or gcrypt are available. This lets us remove the stub hash impl, and so callers can be sure those 4 algs are always available at compile time. They may still be disabled at runtime, so a check for qcrypto_hash_supports() is still best practice to report good error messages. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>