Skip to content

Instantly share code, notes, and snippets.

@samkirton
Created September 18, 2018 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samkirton/a0b0741e44dab4ea5c1bdcedc64d5a58 to your computer and use it in GitHub Desktop.
Save samkirton/a0b0741e44dab4ea5c1bdcedc64d5a58 to your computer and use it in GitHub Desktop.
eos-smart-contract-sha256
#include <eosiolib/crypto.h>
checksum256 uniqueId;
auto purchaseIdChar = purchaseId.c_str();
sha256((char *)purchaseIdChar, sizeof(purchaseIdChar), &uniqueId);
printhex(&uniqueId, sizeof(uniqueId));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment