]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ceph/crypto.h
Merge tag 'omap-for-v4.13/fixes-merge-window' of git://git.kernel.org/pub/scm/linux...
[karo-tx-linux.git] / net / ceph / crypto.h
index 73da34e8c62e1225426921a06be5e2f9839728dd..58d83aa7740f64a68fc25dcbde06791f5ce17496 100644 (file)
@@ -12,37 +12,17 @@ struct ceph_crypto_key {
        struct ceph_timespec created;
        int len;
        void *key;
+       struct crypto_skcipher *tfm;
 };
 
-static inline void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
-{
-       if (key) {
-               kfree(key->key);
-               key->key = NULL;
-       }
-}
-
 int ceph_crypto_key_clone(struct ceph_crypto_key *dst,
                          const struct ceph_crypto_key *src);
 int ceph_crypto_key_encode(struct ceph_crypto_key *key, void **p, void *end);
 int ceph_crypto_key_decode(struct ceph_crypto_key *key, void **p, void *end);
 int ceph_crypto_key_unarmor(struct ceph_crypto_key *key, const char *in);
+void ceph_crypto_key_destroy(struct ceph_crypto_key *key);
 
 /* crypto.c */
-int ceph_decrypt(struct ceph_crypto_key *secret,
-                void *dst, size_t *dst_len,
-                const void *src, size_t src_len);
-int ceph_encrypt(struct ceph_crypto_key *secret,
-                void *dst, size_t *dst_len,
-                const void *src, size_t src_len);
-int ceph_decrypt2(struct ceph_crypto_key *secret,
-                 void *dst1, size_t *dst1_len,
-                 void *dst2, size_t *dst2_len,
-                 const void *src, size_t src_len);
-int ceph_encrypt2(struct ceph_crypto_key *secret,
-                 void *dst, size_t *dst_len,
-                 const void *src1, size_t src1_len,
-                 const void *src2, size_t src2_len);
 int ceph_crypt(const struct ceph_crypto_key *key, bool encrypt,
               void *buf, int buf_len, int in_len, int *pout_len);
 int ceph_crypto_init(void);