10namespace fc {
namespace crypto {
24 using storage_type = std::variant<ecc::private_key_shim, r1::private_key_shim, em::private_key_shim>;
35 template<
typename KeyType = ecc::private_key_shim >
40 template<
typename KeyType = r1::private_key_shim >
45 template<
typename KeyType = ecc::private_key_shim >
72 void from_variant(
const variant& var, crypto::private_key& vo);
std::string to_string(const fc::yield_function_t &yield=fc::yield_function_t()) const
std::variant< ecc::private_key_shim, r1::private_key_shim, em::private_key_shim > storage_type
friend bool operator==(const private_key &p1, const private_key &p2)
static private_key generate()
public_key get_public_key() const
signature sign(const sha256 &digest, bool require_canonical=true) const
static private_key regenerate(const typename KeyType::data_type &data)
sha512 generate_shared_secret(const public_key &pub) const
private_key(const private_key &)=default
private_key(private_key &&)=default
static private_key generate_r1()
friend bool operator!=(const private_key &p1, const private_key &p2)
friend bool operator<(const private_key &p1, const private_key &p2)
private_key & operator=(const private_key &)=default
constexpr const char * private_key_base_prefix
constexpr const char * private_key_prefix[]
fc::sha256 digest(const T &value)
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
void to_variant(const sysio::chain::shared_public_key &var, fc::variant &vo)
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
defines visit functions for T Unless this is specialized, visit() will not be defined for T.