This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern int check(unsigned char key[200]); | |
unsigned char testbed[200]; | |
// Number of correct combination | |
int correct() | |
{ | |
return check(testbed) / 257; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("load", function() { | |
// Checking if Web3 has been injected by the browser (Mist/MetaMask) | |
if (typeof web3 !== "undefined") { | |
// Use Mist/MetaMask's provider | |
window.web3 = new Web3(web3.currentProvider); | |
} else { | |
makeLog("No MetaMask. MetaMask (on Chrome) is required to use this dApp", true); | |
} | |
// Default: send user a notification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>A Simple Smart Contract Generator</title> | |
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'> | |
<link href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' rel='stylesheet' type='text/css'> | |
</head> | |
<body class="container"> | |
<h1>A Simple Smart Contract Generator</h1> |