示例#1
0
bool minikey_to_secret(ec_secret& out_secret, const std::string& key)
{
    if (!check_minikey(key))
        return false;

    out_secret = sha256_hash(to_chunk(key));
    return true;
}
ec_secret minikey_to_secret(const std::string& minikey)
{
    if (!check_minikey(minikey))
        return ec_secret();
    return sha256_hash(to_data_chunk(minikey));
}