aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-11-19 17:09:01 +0000
committerDaniel P. Berrange <berrange@redhat.com>2015-12-23 11:02:20 +0000
commitd84b79d358c3e5a490f8b82641b7f99b52458545 (patch)
treeca8c21261c0d771fe1e871730e37f9d3ab62964d /qapi
parent7b36064c90c377d07d30904318d6cbfe5a133af1 (diff)
crypto: move QCryptoHashAlgorithm enum definition into QAPI
The QCryptoHashAlgorithm enum is defined in the crypto/hash.h header. In the future some QAPI types will want to reference the hash enums, so move the enum definition into QAPI too. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/crypto.json15
1 files changed, 15 insertions, 0 deletions
diff --git a/qapi/crypto.json b/qapi/crypto.json
index 4012659169..0706ded59d 100644
--- a/qapi/crypto.json
+++ b/qapi/crypto.json
@@ -33,3 +33,18 @@
{ 'enum': 'QCryptoSecretFormat',
'prefix': 'QCRYPTO_SECRET_FORMAT',
'data': ['raw', 'base64']}
+
+
+##
+# QCryptoHashAlgorithm:
+#
+# The supported algorithms for computing content digests
+#
+# @md5: MD5. Should not be used in any new code, legacy compat only
+# @sha1: SHA-1. Should not be used in any new code, legacy compat only
+# @sha256: SHA-256. Current recommended strong hash.
+# Since: 2.6
+##
+{ 'enum': 'QCryptoHashAlgorithm',
+ 'prefix': 'QCRYPTO_HASH_ALG',
+ 'data': ['md5', 'sha1', 'sha256']}