std::string 与 abieos::public_key 互转

#include "abieos_numeric.hpp"
#include <stdio.h>
#include <cassert>

using namespace abieos;


int main() {
  std::string pubkey_str = std::string("EOS6S7kyRBUnwhKwfz41E7hCv9swCzT6AicNb7Skiz4LAeY7wG9WJ");
  abieos::public_key pubkey = string_to_public_key(pubkey_str);
  std::string decoded_pubkey_str = public_key_to_string(pubkey);
  assert(decoded_pubkey_str == pubkey_str);
  printf("Succcess!\n");
}

源代码地址:https://github.com/cppfuns/abieos-numeric-c-14/blob/master/test.cpp

版权属于:Surou

本文链接:https://www.bcskill.com/index.php/archives/582.html

相关技术文章仅限于相关区块链底层技术研究,禁止用于非法用途,后果自负!本站严格遵守一切相关法律政策!

评论