PIVX Core  5.6.99
P2P Digital Currency
key_io.h
Go to the documentation of this file.
1 // Copyright (c) 2022 The PIVX Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or https://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_BLS_KEY_IO_H
6 #define PIVX_BLS_KEY_IO_H
7 
8 #include "optional.h"
9 
10 class CChainParams;
11 class CBLSPublicKey;
12 class CBLSSecretKey;
13 
14 namespace bls {
15 
16  std::string EncodeSecret(const CChainParams& params, const CBLSSecretKey& key);
17  Optional<CBLSSecretKey> DecodeSecret(const CChainParams& params, const std::string& keyStr);
18 
19  std::string EncodePublic(const CChainParams& params, const CBLSPublicKey& pk);
20  Optional<CBLSPublicKey> DecodePublic(const CChainParams& params, const std::string& keyStr);
21 
22 } // end bls namespace
23 
24 #endif // PIVX_BLS_KEY_IO_H
CChainParams defines various tweakable parameters of a given instance of the PIVX system.
Definition: chainparams.h:43
Definition: key_io.cpp:11
Optional< CBLSSecretKey > DecodeSecret(const CChainParams &params, const std::string &keyStr)
Definition: key_io.cpp:63
std::string EncodeSecret(const CChainParams &params, const CBLSSecretKey &key)
Definition: key_io.cpp:50
Optional< CBLSPublicKey > DecodePublic(const CChainParams &params, const std::string &keyStr)
Definition: key_io.cpp:68
std::string EncodePublic(const CChainParams &params, const CBLSPublicKey &pk)
Definition: key_io.cpp:55
boost::optional< T > Optional
Substitute for C++17 std::optional.
Definition: optional.h:12