Skip to Content
Building Blockchain Projects
book

Building Blockchain Projects

by Narayan Prusty
April 2017
Intermediate to advanced
266 pages
7h 4m
English
Packt Publishing
Content preview from Building Blockchain Projects

Encrypting queries

Sometimes, you may not want to reveal the data source and/or the input for the data source. For example: you may not want to reveal the API key in the URL if there is any. Therefore, Oraclize provides a way to store queries encrypted in the smart contract and only Oraclize's server has the key to decrypt it.

Oraclize provides a Python tool (https://github.com/Oraclize/encrypted-queries), which can be used to encrypt the data source and/or the data input. It generates a non-deterministic encrypted string.

The CLI command to encrypt an arbitrary string of text is as follows:

    python encrypted_queries_tools.py -e -p 044992e9473b7d90ca54d2886c7addd14a61109af202f1c95e218b0c99eb060c7134c4ae46345d0383ac996185762f04997d6fd6c393c86e4325c469741e64eca9 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Blockchain Apps

Building Blockchain Apps

Michael Juntao Yuan
Blockchain Development with Hyperledger

Blockchain Development with Hyperledger

Salman A. Baset, Luc Desrosiers, Nitin Gaur, Petr Novotny
Advanced Blockchain Development

Advanced Blockchain Development

Imran Bashir, Narayan Prusty

Publisher Resources

ISBN: 9781787122147Supplemental Content