diff --git a/docs/solidity/decryption.md b/docs/solidity/decryption.md index 0e30d90..2687c0c 100644 --- a/docs/solidity/decryption.md +++ b/docs/solidity/decryption.md @@ -5,12 +5,18 @@ We allow explicit decryption requests for any encrypted type. The values are decrypted through the distributed decryption protocol and are stored on-chain. -### Example +### Examples ```solidity function decryptAmount(euint8 amount) public view returns (uint8) { return TFHE.decrypt(amount); } + +function revertIfConditionIsFalse(ebool condition) public { + bool plaintextCondition = TFHE.decrypt(condition); + require(plaintextCondition, "Condition was not met"); + // ... continue execution if `condition` is true +} ``` ## Booleans