1

I am looking for python syntax to draw the autoglyphs using python.

Here is the few lines which I want to convert in python. I am new to it. Please help me out with this.

uint a = uint(uint160(keccak256(abi.encodePacked(idToSeed[id]))));
output[c] = prefix[c];
idToSymbolScheme[id] == 0

Here is the code in c++ which I trying to replicate in python. https://www.larvalabs.com/autoglyphs

2
  • What's idToSeed[id]?
    – Ismael
    May 28 at 0:04
  • Ismael Please refer to the below code. uint id mapping (uint256 => uint256) internal idToSeed; uint a = uint(uint160(keccak256(abi.encodePacked(idToSeed[id])))); I want to convert it in python. Jun 1 at 13:26
-2

The links below detail:

  1. Keccak256 hash function in Solidity https://cryptomarketpool.com/keccak256/

  2. Convert a string to SHA256 in Python https://cryptomarketpool.com/convert-a-string-to-sha256-in-python/

  3. Pip install web3.py. Then use the classmethod Web3.keccak(primitive=None, hexstr=None, text=None)

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.