summaryrefslogtreecommitdiffstats
path: root/ncr-cipher.h
diff options
context:
space:
mode:
Diffstat (limited to 'ncr-cipher.h')
-rw-r--r--ncr-cipher.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/ncr-cipher.h b/ncr-cipher.h
new file mode 100644
index 0000000..a582fc6
--- /dev/null
+++ b/ncr-cipher.h
@@ -0,0 +1,20 @@
+/* cipher stuff */
+
+#ifndef NCR_CIPHER_H
+# define NCR_CIPHER_H
+
+ncr_session_t ncr_cipher_init(struct list_sem_st* sess_lst,
+ ncr_algorithm_t algorithm, struct key_item_st *key, void* iv, size_t iv_size);
+int ncr_cipher_encrypt(struct list_sem_st* sess_lst, ncr_session_t session,
+ const struct data_item_st * plaintext, struct data_item_st* ciphertext);
+int ncr_cipher_decrypt(struct list_sem_st* sess_lst, ncr_session_t session,
+ const struct data_item_st * ciphertext, struct data_item_st* plaintext);
+void ncr_cipher_deinit(struct list_sem_st* lst, ncr_session_t session);
+
+int _ncr_cipher_encrypt(struct list_sem_st* sess_lst,
+ ncr_session_t session, void* plaintext, size_t plaintext_size);
+
+int _ncr_cipher_decrypt(struct list_sem_st* sess_lst,
+ ncr_session_t session, void* plaintext, size_t plaintext_size);
+
+#endif /* NCR_CIPHER_H */