Skip to content

Instantly share code, notes, and snippets.

@vasa-develop
Created July 21, 2018 18:40
Show Gist options
  • Save vasa-develop/e7175d9a65216bb3286942c3ba3b5788 to your computer and use it in GitHub Desktop.
Save vasa-develop/e7175d9a65216bb3286942c3ba3b5788 to your computer and use it in GitHub Desktop.
DO NOT USE THIS CODE. THIS CODE IS USED TO DEMONSTRATE A VULNERABILITY IN A SOLIDITY CODE.
import "Rot13Encryption.sol";
// encrypt your top secret info
contract EncryptionContract {
// library for encryption
Rot13Encryption encryptionLibrary;
// constructor - initialise the library
constructor(Rot13Encryption _encryptionLibrary) {
encryptionLibrary = _encryptionLibrary;
}
function encryptPrivateData(string privateInfo) {
// potentially do some operations here
encryptionLibrary.rot13Encrypt(privateInfo);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment