|
Packit |
141393 |
/*
|
|
Packit |
141393 |
* Argon2 reference source code package - reference C implementations
|
|
Packit |
141393 |
*
|
|
Packit |
141393 |
* Copyright 2015
|
|
Packit |
141393 |
* Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves
|
|
Packit |
141393 |
*
|
|
Packit |
141393 |
* You may use this work under the terms of a Creative Commons CC0 1.0
|
|
Packit |
141393 |
* License/Waiver or the Apache Public License 2.0, at your option. The terms of
|
|
Packit |
141393 |
* these licenses can be found at:
|
|
Packit |
141393 |
*
|
|
Packit |
141393 |
* - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
|
|
Packit |
141393 |
* - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
141393 |
*
|
|
Packit |
141393 |
* You should have received a copy of both of these licenses along with this
|
|
Packit |
141393 |
* software. If not, they may be obtained at the above URLs.
|
|
Packit |
141393 |
*/
|
|
Packit |
141393 |
|
|
Packit |
141393 |
#ifndef ARGON2_OPT_H
|
|
Packit |
141393 |
#define ARGON2_OPT_H
|
|
Packit |
141393 |
|
|
Packit |
141393 |
#include "core.h"
|
|
Packit |
141393 |
#include <emmintrin.h>
|
|
Packit |
141393 |
|
|
Packit |
141393 |
/*
|
|
Packit |
141393 |
* Function fills a new memory block and optionally XORs the old block over the new one.
|
|
Packit |
141393 |
* Memory must be initialized.
|
|
Packit |
141393 |
* @param state Pointer to the just produced block. Content will be updated(!)
|
|
Packit |
141393 |
* @param ref_block Pointer to the reference block
|
|
Packit |
141393 |
* @param next_block Pointer to the block to be XORed over. May coincide with @ref_block
|
|
Packit |
141393 |
* @param with_xor Whether to XOR into the new block (1) or just overwrite (0)
|
|
Packit |
141393 |
* @pre all block pointers must be valid
|
|
Packit |
141393 |
*/
|
|
Packit |
141393 |
static void fill_block(__m128i *s, const block *ref_block, block *next_block, int with_xor);
|
|
Packit |
141393 |
|
|
Packit |
141393 |
#endif /* ARGON2_OPT_H */
|