2018-09-07 16:00:13 +01:00
|
|
|
/*
|
2020-01-24 10:10:40 +00:00
|
|
|
* Copyright (c) 2018-2020 Atmosphère-NX
|
2018-09-07 16:00:13 +01:00
|
|
|
*
|
|
|
|
* This program 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.
|
|
|
|
*
|
|
|
|
* This program 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/>.
|
|
|
|
*/
|
|
|
|
|
2018-02-20 05:47:11 +00:00
|
|
|
#ifndef EXOSPHERE_TITLEKEY_H
|
|
|
|
#define EXOSPHERE_TITLEKEY_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2018-09-09 07:51:52 +01:00
|
|
|
#define TITLEKEY_TYPE_MAX 0x1
|
|
|
|
|
2018-02-21 02:47:58 +00:00
|
|
|
void tkey_set_expected_label_hash(uint64_t *label_hash);
|
2018-02-20 05:47:11 +00:00
|
|
|
void tkey_set_master_key_rev(unsigned int master_key_rev);
|
2018-09-09 07:51:52 +01:00
|
|
|
void tkey_set_type(unsigned int type);
|
2018-02-20 05:47:11 +00:00
|
|
|
|
2018-02-21 02:47:58 +00:00
|
|
|
size_t tkey_rsa_oaep_unwrap(void *dst, size_t dst_size, void *src, size_t src_size);
|
2018-02-20 05:47:11 +00:00
|
|
|
|
|
|
|
void tkey_aes_unwrap(void *dst, size_t dst_size, const void *src, size_t src_size);
|
|
|
|
|
|
|
|
#endif
|