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_REF_H 19 #define ARGON2_REF_H 20 21 #include "core.h" 22 23 /* 24 * Function fills a new memory block and optionally XORs the old block over the new one. 25 * @next_block must be initialized. 26 * @param prev_block Pointer to the previous block 27 * @param ref_block Pointer to the reference block 28 * @param next_block Pointer to the block to be constructed 29 * @param with_xor Whether to XOR into the new block (1) or just overwrite (0) 30 * @pre all block pointers must be valid 31 */ 32 static void fill_block(const block *prev_block, const block *ref_block, 33 block *next_block, int with_xor); 34 35 #endif /* ARGON2_REF_H */ 36