(text:str)
| 124 | |
| 125 | @staticmethod |
| 126 | def decode(text:str)->str: |
| 127 | decoded = text |
| 128 | try: |
| 129 | if text is None: |
| 130 | return None |
| 131 | if Util.isHexa(text): |
| 132 | text = repr(text) |
| 133 | |
| 134 | if not text.isdigit(): |
| 135 | decoded = text.encode('latin').decode('unicode_escape') |
| 136 | except Exception as e: |
| 137 | hex_values = [ord(c) for c in text] |
| 138 | ascii_values = [chr(v) for v in hex_values] |
| 139 | decoded = ''.join(c for c in ascii_values if len(c)==1) |
| 140 | |
| 141 | return decoded |
| 142 | |
| 143 | class Hashing: |
| 144 | @staticmethod |
no test coverage detected