1
// Copyright © 2017-2020 Trust Wallet.
2
//
3
// This file is part of Trust. The full Trust copyright notice, including
4
// terms governing use, modification, and redistribution, is contained in the
5
// file LICENSE at the root of the source code distribution tree.
6

7
#pragma once
8

9
#include "../Data.h"
10

11
#include <nlohmann/json.hpp>
12

13
namespace TW::Keystore {
14

15
// AES128 parameters.
16 1
struct AESParameters {
17
    static const std::size_t blockSize = 128 / 8;
18

19
    Data iv;
20

21
    /// Initializes `AESParameters` with a random `iv` for AES 128.
22
    AESParameters();
23

24
    /// Initializes `AESParameters` with a JSON object.
25
    AESParameters(const nlohmann::json& json);
26

27
    /// Saves `this` as a JSON object.
28
    nlohmann::json json() const;
29
};
30

31
} // namespace TW::Keystore

Read our documentation on viewing source code .

Loading