def get_base64(self): """ Return all possible Base64-encoded strings in the APK. :return: a set of strings containing possible Base64-encoded string """ return { string for string in self.all_strings if validate_base64(string) }
def get_base64(self): """ Return all possible Base64-encoded strings in the APK. :return: a set of strings containing possible Base64-encoded string """ base64 = set() for string in self.all_strings: if validate_base64(string): base64.add(string) return base64
def test_validate_base64_with_invalid_string(): result = validate_base64("NOT_A_BASE64") assert result is False
def test_validate_base64_with_valid_string(): result = validate_base64("TWVzc2VuZ2U=") assert result is True