diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-24 12:14:00 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-07-24 12:35:38 +0200 |
commit | 4b45720ea1dffc3514c81439c7f93928d05c5521 (patch) | |
tree | 17518795d5e965411b5c2c5ed787cf2c220d738e /examples/ncr.c | |
parent | 951eda087f418c2a5ced189fa9d64c8616634dd0 (diff) | |
download | cryptodev-linux-4b45720ea1dffc3514c81439c7f93928d05c5521.tar.gz cryptodev-linux-4b45720ea1dffc3514c81439c7f93928d05c5521.tar.xz cryptodev-linux-4b45720ea1dffc3514c81439c7f93928d05c5521.zip |
Simplified the session_op structure and combined the OP_SIGN with the OP_DIGEST
for digest algorithms.
Diffstat (limited to 'examples/ncr.c')
-rw-r--r-- | examples/ncr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/ncr.c b/examples/ncr.c index 234e8bd..d9870e0 100644 --- a/examples/ncr.c +++ b/examples/ncr.c @@ -809,8 +809,8 @@ test_ncr_aes(int cfd) nop.init.algorithm = NCR_ALG_AES_ECB; nop.init.key = key; nop.init.op = NCR_OP_ENCRYPT; - nop.op.data.cipher.plaintext = dd; - nop.op.data.cipher.ciphertext = dd2; + nop.op.input = dd; + nop.op.output = dd2; if (ioctl(cfd, NCRIO_SESSION_ONCE, &nop)) { fprintf(stderr, "Error: %s:%d\n", __func__, __LINE__); @@ -884,8 +884,8 @@ test_ncr_aes(int cfd) nop.init.algorithm = NCR_ALG_AES_ECB; nop.init.key = key; nop.init.op = NCR_OP_DECRYPT; - nop.op.data.cipher.ciphertext = dd; - nop.op.data.cipher.plaintext = dd2; + nop.op.input = dd; + nop.op.output = dd2; if (ioctl(cfd, NCRIO_SESSION_ONCE, &nop)) { fprintf(stderr, "Error: %s:%d\n", __func__, __LINE__); @@ -946,7 +946,7 @@ struct hash_vectors_st { .plaintext_size = sizeof("what do ya want for nothing?")-1, .output = (uint8_t*)"\x8f\x82\x03\x94\xf9\x53\x35\x18\x20\x45\xda\x24\xf3\x4d\xe5\x2b\xf8\xbc\x34\x32", .output_size = 20, - .op = NCR_OP_DIGEST, + .op = NCR_OP_SIGN, }, { .name = "HMAC-MD5", @@ -1098,8 +1098,8 @@ test_ncr_hash(int cfd) if (hash_vectors[i].key != NULL) nop.init.key = key; nop.init.op = hash_vectors[i].op; - nop.op.data.sign.text = dd; - nop.op.data.sign.output = dd2; + nop.op.input = dd; + nop.op.output = dd2; if (ioctl(cfd, NCRIO_SESSION_ONCE, &nop)) { fprintf(stderr, "Error: %s:%d\n", __func__, __LINE__); |