aead.h revision 2
1N/A/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 1N/A * Copyright 2008, 2009 by the Massachusetts Institute of Technology. 1N/A * All Rights Reserved. 1N/A * Export of this software from the United States of America may 1N/A * require a specific license from the United States Government. 1N/A * It is the responsibility of any person or organization contemplating 1N/A * export to obtain such a license before exporting. 1N/A * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 1N/A * distribute this software and its documentation for any purpose and 1N/A * without fee is hereby granted, provided that the above copyright 1N/A * notice appear in all copies and that both that copyright notice and 1N/A * this permission notice appear in supporting documentation, and that 1N/A * the name of M.I.T. not be used in advertising or publicity pertaining 1N/A * to distribution of the software without specific, written prior 1N/A * permission. Furthermore if you modify this software you must label 1N/A * your software as modified software and not distribute it in such a 1N/A * fashion that it might be confused with the original M.I.T. software. 1N/A * M.I.T. makes no representations about the suitability of 1N/A * this software for any purpose. It is provided "as is" without express 1N/A * or implied warranty. 1N/A * Returns an alias into the current buffer if the next block is fully 1N/A * contained within; otherwise makes a copy of the next block and returns an 1N/A * alias to storage. After calling this function, encrypt the returned block 1N/A * in place and then call iov_store_block (with a separate output cursor) to 1N/A * store the result back into the iov if necessary. Returns NULL if there 1N/Astatic inline unsigned char *
1N/A /* Return an alias to memory inside the current iov. */ 1N/A /* Do it the slow way and return a copy into storage. */ 1N/A * Store a block retrieved with iov_next_block if necessary, and advance the 1N/A /* We got the block the slow way; put it back that way too. */ 1N/A /* It's already stored; we just have to advance the output cursor. */