clarity-lang / reference

The Clarity Reference
147 stars 35 forks source link

Ability to mix several inputs with hash functions #16

Open lgalabru opened 4 years ago

lgalabru commented 4 years ago

As of today, clarity hash functions (sha-256, sha-512, ...) can only take 1 buffer argument. Instead, this functions should probably be variadic, so that smart contracts can re-compute onchain hashed values that have been constructed offchain (useful for commit-reveal patterns, where the commit phase is based on a hash mixing multiple inputs).

psq commented 4 years ago

so this would apply the hash on the concatenation of the parameters, in the order provided?