summaryrefslogtreecommitdiffstats
path: root/userspace/ncrypto_key.c
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-06 01:52:00 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-23 20:01:59 +0200
commit6404fb1b9aaa2b4a5d85bf5f9422f3179e772689 (patch)
tree73aacfd6c3a290853515b81a045abc1de65417f5 /userspace/ncrypto_key.c
parentc61ec8d5ec0e30b60f04fbce411082ae8019051b (diff)
downloadcryptodev-linux-6404fb1b9aaa2b4a5d85bf5f9422f3179e772689.tar.gz
cryptodev-linux-6404fb1b9aaa2b4a5d85bf5f9422f3179e772689.tar.xz
cryptodev-linux-6404fb1b9aaa2b4a5d85bf5f9422f3179e772689.zip
Add ncr_key_get_algorithm()
Diffstat (limited to 'userspace/ncrypto_key.c')
-rw-r--r--userspace/ncrypto_key.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/userspace/ncrypto_key.c b/userspace/ncrypto_key.c
index e424c87..db46ee4 100644
--- a/userspace/ncrypto_key.c
+++ b/userspace/ncrypto_key.c
@@ -123,6 +123,16 @@ ncr_key_get_info(struct ncr_key_info_st *dest, ncr_key_t key)
return 0;
}
+ncr_algorithm_t
+ncr_key_get_algorithm(ncr_key_t key)
+{
+ struct ncr_key_info_st io;
+
+ if (ncr_key_get_info(&io, key) < 0)
+ return -1;
+ return io.algorithm;
+}
+
int
ncr_key_get_flags(ncr_key_t key)
{