bool uc_ecc_create_key(uc_ed25519_key *key) { if (!uc_init()) return false; wc_ed25519_init(key); if (wc_ed25519_make_key(&uc_random, ED25519_KEY_SIZE, key)) return false; // UCDUMP("ECCPRV", key->k, ED25519_PRV_KEY_SIZE); UCDUMP("ECCPUB", key->p, ED25519_PUB_KEY_SIZE); return true; }
int main() { uc_init(NULL,1); /* here we are telling UC to force the import of our callback, but with the specific name _dout_callback */ uc_import("void _dout_callback(char*)",&dump_fn); /* any output sent to cout will be sent to our callback, as soon as each line is flushed (which endl always does) */ uc_exec("cout << 20.3 << \" and \" << 20 << endl;"); uc_exec("cout << 'x' << endl;"); // uc_exec("#lib $self"); uc_finis(); }
dev_uc_suite dev_uc_init(const uint_least8_t options, const char *name, const char *comment) { return (dev_uc_suite)uc_init(options, name, comment); }