- usencrypt.ifelse(b, x, y)#
Ternary if-else expression for programming with encrypted objects.
True. Otherwise, it returns
- Return type
A subclass of
Short-circuiting is not supported in order to maintain the security of the method. Therefore, this function is strict in all its three arguments.
>>> import usencrypt as ue >>> a = ue.encrypt(0.25) >>> b = ue.encrypt(0.5) >>> c = ue.ifelse(a > b, a, b) >>> ue.decrypt(c) 0.5