0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <linux/crypto.h>
0010 #include "internal.h"
0011
0012 int crypto_comp_compress(struct crypto_comp *comp,
0013 const u8 *src, unsigned int slen,
0014 u8 *dst, unsigned int *dlen)
0015 {
0016 struct crypto_tfm *tfm = crypto_comp_tfm(comp);
0017
0018 return tfm->__crt_alg->cra_compress.coa_compress(tfm, src, slen, dst,
0019 dlen);
0020 }
0021 EXPORT_SYMBOL_GPL(crypto_comp_compress);
0022
0023 int crypto_comp_decompress(struct crypto_comp *comp,
0024 const u8 *src, unsigned int slen,
0025 u8 *dst, unsigned int *dlen)
0026 {
0027 struct crypto_tfm *tfm = crypto_comp_tfm(comp);
0028
0029 return tfm->__crt_alg->cra_compress.coa_decompress(tfm, src, slen, dst,
0030 dlen);
0031 }
0032 EXPORT_SYMBOL_GPL(crypto_comp_decompress);