Questions tagged [hash]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
4answers
1k views

How to hash a Tezos public key

I need to create a Tezos public key hash based on a public ed25519 key only. I am aware of an utility that generates entire keystore based on mnemonics - this is not what I need. I'd welcome either ...
4
votes
3answers
204 views

How are the originated contract addreses (KT1) computed?

How are smart contract addresses (those that start with KT1) computed? I would like to know whether CHAIN_ID is somehow used in its computation, or it is possible to have two KT1 contracts with ...
1
vote
1answer
223 views

Pseudo-random numbers for NFT attribute random generation

I'd like to generate an NFT within a contract and give it a randomly occurring attribute. As I search, it seems that the only fully-secure way to do this is to use an Oracle or build some sort of ...
1
vote
1answer
356 views

Converting a hash into an int within a range

I have a contract where I'd like to convert a hash (sha256 in this case, but I'm open to any of the other hashing algorithms available) into an Int (or Nat) between 1 and 100. I have the code that ...