String.containedin#
- usencrypt.cipher.String.containedin(self, collection)#
Checks whether the encrypted string \(E(x)\) is contained in the given collection.
- Parameters
collection (
list
ofusencrypt.cipher.String
orstr
) – The collection to be checked.- Returns
An encrypted boolean indicating whether or not the encrypted string is contained in
collection
.- Return type
- Examples
>>> import usencrypt as ue >>> ue_a = ue.encrypt('abc') >>> list = ['hello', 'abc'] >>> result = ue_a.containedin(list) >>> result (0x7fe5785dbd90) Boolean: 0xbd9801e5f4dd08f801d4cd05dc41df3c6768dc197ec492d41b8ff05cd360d8f1 >>> ue.decrypt(result) True