summaryrefslogtreecommitdiffstats
path: root/examples/cipher.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cipher.c')
-rw-r--r--examples/cipher.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/cipher.c b/examples/cipher.c
index c7ce2c2..1334f02 100644
--- a/examples/cipher.c
+++ b/examples/cipher.c
@@ -19,10 +19,10 @@
static int
test_crypto(int cfd)
{
- char plaintext[DATA_SIZE];
- char ciphertext[DATA_SIZE];
- char iv[BLOCK_SIZE];
- char key[KEY_SIZE];
+ uint8_t plaintext[DATA_SIZE];
+ uint8_t ciphertext[DATA_SIZE];
+ uint8_t iv[BLOCK_SIZE];
+ uint8_t key[KEY_SIZE];
struct session_op sess;
struct crypt_op cryp;
@@ -91,14 +91,14 @@ test_crypto(int cfd)
static int test_aes(int cfd)
{
- char plaintext1[BLOCK_SIZE];
- char ciphertext1[BLOCK_SIZE] = { 0xdf, 0x55, 0x6a, 0x33, 0x43, 0x8d, 0xb8, 0x7b, 0xc4, 0x1b, 0x17, 0x52, 0xc5, 0x5e, 0x5e, 0x49 };
- char iv1[BLOCK_SIZE];
- char key1[KEY_SIZE] = { 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- char plaintext2[BLOCK_SIZE] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00 };
- char ciphertext2[BLOCK_SIZE] = { 0xb7, 0x97, 0x2b, 0x39, 0x41, 0xc4, 0x4b, 0x90, 0xaf, 0xa7, 0xb2, 0x64, 0xbf, 0xba, 0x73, 0x87 };
- char iv2[BLOCK_SIZE];
- char key2[KEY_SIZE];
+ uint8_t plaintext1[BLOCK_SIZE];
+ uint8_t ciphertext1[BLOCK_SIZE] = { 0xdf, 0x55, 0x6a, 0x33, 0x43, 0x8d, 0xb8, 0x7b, 0xc4, 0x1b, 0x17, 0x52, 0xc5, 0x5e, 0x5e, 0x49 };
+ uint8_t iv1[BLOCK_SIZE];
+ uint8_t key1[KEY_SIZE] = { 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ uint8_t plaintext2[BLOCK_SIZE] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00 };
+ uint8_t ciphertext2[BLOCK_SIZE] = { 0xb7, 0x97, 0x2b, 0x39, 0x41, 0xc4, 0x4b, 0x90, 0xaf, 0xa7, 0xb2, 0x64, 0xbf, 0xba, 0x73, 0x87 };
+ uint8_t iv2[BLOCK_SIZE];
+ uint8_t key2[KEY_SIZE];
struct session_op sess;
struct crypt_op cryp;