From 5fa0fea27461f5ff7fad07687618db08272e9502 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Wed, 29 Aug 2007 16:31:34 +0800 Subject: [CRYPTO] scatterwalk: Add scatterwalk_map_and_copy This patch adds the function scatterwalk_map_and_copy which reads or writes a chunk of data from a scatterlist at a given offset. It will be used by authenc which would read/write the authentication data at the end of the cipher/plain text. Signed-off-by: Herbert Xu --- crypto/scatterwalk.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crypto/scatterwalk.h') diff --git a/crypto/scatterwalk.h b/crypto/scatterwalk.h index f1592cc2d0f4..500a220ad908 100644 --- a/crypto/scatterwalk.h +++ b/crypto/scatterwalk.h @@ -74,4 +74,7 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, void *scatterwalk_map(struct scatter_walk *walk, int out); void scatterwalk_done(struct scatter_walk *walk, int out, int more); +void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg, + unsigned int start, unsigned int nbytes, int out); + #endif /* _CRYPTO_SCATTERWALK_H */ -- cgit v1.2.2