diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-24 13:43:43 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-24 18:38:58 +0200 |
commit | ffb3e747f8b50ca18701530d1729a4ee3aa4ae69 (patch) | |
tree | efa9b3552566ce2891c1c105cd9fd5f4c3baa269 /examples/ncr.c | |
parent | 4b45720ea1dffc3514c81439c7f93928d05c5521 (diff) | |
download | cryptodev-linux-ffb3e747f8b50ca18701530d1729a4ee3aa4ae69.tar.gz cryptodev-linux-ffb3e747f8b50ca18701530d1729a4ee3aa4ae69.tar.xz cryptodev-linux-ffb3e747f8b50ca18701530d1729a4ee3aa4ae69.zip |
Added a support for reading session data directly from userspace.
Diffstat (limited to 'examples/ncr.c')
-rw-r--r-- | examples/ncr.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/examples/ncr.c b/examples/ncr.c index d9870e0..bd5779c 100644 --- a/examples/ncr.c +++ b/examples/ncr.c @@ -809,8 +809,9 @@ test_ncr_aes(int cfd) nop.init.algorithm = NCR_ALG_AES_ECB; nop.init.key = key; nop.init.op = NCR_OP_ENCRYPT; - nop.op.input = dd; - nop.op.output = dd2; + nop.op.data.ndata.input = dd; + nop.op.data.ndata.output = dd2; + nop.op.type = NCR_DATA; if (ioctl(cfd, NCRIO_SESSION_ONCE, &nop)) { fprintf(stderr, "Error: %s:%d\n", __func__, __LINE__); @@ -884,8 +885,9 @@ test_ncr_aes(int cfd) nop.init.algorithm = NCR_ALG_AES_ECB; nop.init.key = key; nop.init.op = NCR_OP_DECRYPT; - nop.op.input = dd; - nop.op.output = dd2; + nop.op.data.ndata.input = dd; + nop.op.data.ndata.output = dd2; + nop.op.type = NCR_DATA; if (ioctl(cfd, NCRIO_SESSION_ONCE, &nop)) { fprintf(stderr, "Error: %s:%d\n", __func__, __LINE__); @@ -1098,8 +1100,9 @@ test_ncr_hash(int cfd) if (hash_vectors[i].key != NULL) nop.init.key = key; nop.init.op = hash_vectors[i].op; - nop.op.input = dd; - nop.op.output = dd2; + nop.op.data.ndata.input = dd; + nop.op.data.ndata.output = dd2; + nop.op.type = NCR_DATA; if (ioctl(cfd, NCRIO_SESSION_ONCE, &nop)) { fprintf(stderr, "Error: %s:%d\n", __func__, __LINE__); |