1 /*
2  * Argon2 reference source code package - reference C implementations
3  *
4  * Copyright 2015
5  * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves
6  *
7  * You may use this work under the terms of a Creative Commons CC0 1.0
8  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9  * these licenses can be found at:
10  *
11  * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12  * - Apache 2.0        : http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * You should have received a copy of both of these licenses along with this
15  * software. If not, they may be obtained at the above URLs.
16  */
17 
18 #ifndef ARGON2_OPT_H
19 #define ARGON2_OPT_H
20 
21 #include "core.h"
22 #include <emmintrin.h>
23 
24 /*
25  * Function fills a new memory block and optionally XORs the old block over the new one.
26  * Memory must be initialized.
27  * @param state Pointer to the just produced block. Content will be updated(!)
28  * @param ref_block Pointer to the reference block
29  * @param next_block Pointer to the block to be XORed over. May coincide with @ref_block
30  * @param with_xor Whether to XOR into the new block (1) or just overwrite (0)
31  * @pre all block pointers must be valid
32  */
33 static void fill_block(__m128i *s, const block *ref_block, block *next_block, int with_xor);
34 
35 #endif /* ARGON2_OPT_H */
36