mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-29 21:52:22 +00:00
32 lines
1.3 KiB
C
32 lines
1.3 KiB
C
|
/*
|
||
|
* aes.h
|
||
|
*
|
||
|
* Copyright (c) 2020, DarkMatterCore <pabloacurielz@gmail.com>.
|
||
|
*
|
||
|
* This file is part of nxdumptool (https://github.com/DarkMatterCore/nxdumptool).
|
||
|
*
|
||
|
* nxdumptool is free software; you can redistribute it and/or modify it
|
||
|
* under the terms and conditions of the GNU General Public License,
|
||
|
* version 2, as published by the Free Software Foundation.
|
||
|
*
|
||
|
* nxdumptool is distributed in the hope it will be useful, but WITHOUT
|
||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||
|
* more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#ifndef __AES_H__
|
||
|
#define __AES_H__
|
||
|
|
||
|
/// Performs an AES-128-XTS crypto operation using the non-standard Nintendo XTS tweak.
|
||
|
/// The Aes128XtsContext element should have been previously initialized with aes128XtsContextCreate(). 'encrypt' should match the value of 'is_encryptor' used with that call.
|
||
|
/// 'dst' and 'src' can both point to the same address.
|
||
|
size_t aes128XtsNintendoCrypt(Aes128XtsContext *ctx, void *dst, const void *src, size_t size, u64 sector, size_t sector_size, bool encrypt);
|
||
|
|
||
|
#endif /* __AES_H__ */
|