String.isnumber#

usencrypt.cipher.String.isnumber(self, end_on_nul=True) usencrypt.cipher._boolean.Boolean#

Checks whether the encrypted string \(E(x)\) contains only encrypted number ASCII characters.

Parameters

end_on_null (bool) – Indicates whether to terminate when a pad is encountered. Defaults to True.

Returns

An encrypted boolean indicating whether the given self is made of only encrypted characters that represent a number.

Return type

usencrypt.cipher.Boolean

Examples
>>> import usencrypt as ue
>>> ue_a = ue.encrypt('abc')
>>> result = ue_a.isnumber()
>>> result
(0x7f23638d6f40) Boolean: 0x2b4002236deb683593dda4633dff9ce57a6d2dd68809b8a5a22e13ebb467b81c
>>> ue.decrypt(result)
False
>>> import usencrypt as ue
>>> ue_b = ue.encrypt('5.132')
>>> result = ue_b.isnumber()
>>> result
(0x7f23638d6e20) Boolean: 0x660fd158797c47962897b732a203b90d1eefd7f5131e7c08699fe4fe5ff33ef8
>>> ue.decrypt(result)
True