lz4hc.c (5800571960234f9d1f1011bf135799b2014d4268) lz4hc.c (d6ebf5286f8f94a254a8c90d4b9f2a8b076a8634)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Cryptographic API.
4 *
5 * Copyright (c) 2013 Chanho Min <chanho.min@lge.com>
1/*
2 * Cryptographic API.
3 *
4 * Copyright (c) 2013 Chanho Min <chanho.min@lge.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 *
6 */
7#include <linux/init.h>
8#include <linux/module.h>
9#include <linux/crypto.h>
10#include <linux/vmalloc.h>
11#include <linux/lz4.h>
12#include <crypto/internal/scompress.h>
13

--- 88 unchanged lines hidden (view full) ---

102 unsigned int slen, u8 *dst,
103 unsigned int *dlen)
104{
105 return __lz4hc_decompress_crypto(src, slen, dst, dlen, NULL);
106}
107
108static struct crypto_alg alg_lz4hc = {
109 .cra_name = "lz4hc",
19 */
20#include <linux/init.h>
21#include <linux/module.h>
22#include <linux/crypto.h>
23#include <linux/vmalloc.h>
24#include <linux/lz4.h>
25#include <crypto/internal/scompress.h>
26

--- 88 unchanged lines hidden (view full) ---

115 unsigned int slen, u8 *dst,
116 unsigned int *dlen)
117{
118 return __lz4hc_decompress_crypto(src, slen, dst, dlen, NULL);
119}
120
121static struct crypto_alg alg_lz4hc = {
122 .cra_name = "lz4hc",
123 .cra_driver_name = "lz4hc-generic",
110 .cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
111 .cra_ctxsize = sizeof(struct lz4hc_ctx),
112 .cra_module = THIS_MODULE,
113 .cra_init = lz4hc_init,
114 .cra_exit = lz4hc_exit,
115 .cra_u = { .compress = {
116 .coa_compress = lz4hc_compress_crypto,
117 .coa_decompress = lz4hc_decompress_crypto } }

--- 43 unchanged lines hidden ---
124 .cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
125 .cra_ctxsize = sizeof(struct lz4hc_ctx),
126 .cra_module = THIS_MODULE,
127 .cra_init = lz4hc_init,
128 .cra_exit = lz4hc_exit,
129 .cra_u = { .compress = {
130 .coa_compress = lz4hc_compress_crypto,
131 .coa_decompress = lz4hc_decompress_crypto } }

--- 43 unchanged lines hidden ---