| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * AEAD: Authenticated Encryption with Associated Data |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2007-2015 Herbert Xu <herbert@gondor.apana.org.au> |
|---|
| 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 as published by the Free |
|---|
| 8 | | - * Software Foundation; either version 2 of the License, or (at your option) |
|---|
| 9 | | - * any later version. |
|---|
| 10 | | - * |
|---|
| 11 | 6 | */ |
|---|
| 12 | 7 | |
|---|
| 13 | 8 | #ifndef _CRYPTO_INTERNAL_AEAD_H |
|---|
| .. | .. |
|---|
| 86 | 81 | return container_of(req, struct aead_request, base); |
|---|
| 87 | 82 | } |
|---|
| 88 | 83 | |
|---|
| 89 | | -static inline void crypto_set_aead_spawn( |
|---|
| 90 | | - struct crypto_aead_spawn *spawn, struct crypto_instance *inst) |
|---|
| 91 | | -{ |
|---|
| 92 | | - crypto_set_spawn(&spawn->base, inst); |
|---|
| 93 | | -} |
|---|
| 94 | | - |
|---|
| 95 | | -int crypto_grab_aead(struct crypto_aead_spawn *spawn, const char *name, |
|---|
| 96 | | - u32 type, u32 mask); |
|---|
| 84 | +int crypto_grab_aead(struct crypto_aead_spawn *spawn, |
|---|
| 85 | + struct crypto_instance *inst, |
|---|
| 86 | + const char *name, u32 type, u32 mask); |
|---|
| 97 | 87 | |
|---|
| 98 | 88 | static inline void crypto_drop_aead(struct crypto_aead_spawn *spawn) |
|---|
| 99 | 89 | { |
|---|
| .. | .. |
|---|
| 116 | 106 | unsigned int reqsize) |
|---|
| 117 | 107 | { |
|---|
| 118 | 108 | aead->reqsize = reqsize; |
|---|
| 119 | | -} |
|---|
| 120 | | - |
|---|
| 121 | | -static inline unsigned int crypto_aead_alg_maxauthsize(struct aead_alg *alg) |
|---|
| 122 | | -{ |
|---|
| 123 | | - return alg->maxauthsize; |
|---|
| 124 | | -} |
|---|
| 125 | | - |
|---|
| 126 | | -static inline unsigned int crypto_aead_maxauthsize(struct crypto_aead *aead) |
|---|
| 127 | | -{ |
|---|
| 128 | | - return crypto_aead_alg_maxauthsize(crypto_aead_alg(aead)); |
|---|
| 129 | 109 | } |
|---|
| 130 | 110 | |
|---|
| 131 | 111 | static inline void aead_init_queue(struct aead_queue *queue, |
|---|