{"id":23379018,"url":"https://github.com/santisq/encodemessage","last_synced_at":"2026-07-15T19:06:39.949Z","repository":{"id":142179291,"uuid":"495130970","full_name":"santisq/EncodeMessage","owner":"santisq","description":"fun exercise at encoding and decoding strings with classes ","archived":false,"fork":false,"pushed_at":"2022-05-28T04:57:46.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T07:42:24.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santisq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-22T17:35:47.000Z","updated_at":"2023-01-03T15:40:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"12cd52b2-c3fa-4c72-94b1-885118e10343","html_url":"https://github.com/santisq/EncodeMessage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/santisq/EncodeMessage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FEncodeMessage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FEncodeMessage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FEncodeMessage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FEncodeMessage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santisq","download_url":"https://codeload.github.com/santisq/EncodeMessage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santisq%2FEncodeMessage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35517555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-21T19:16:10.815Z","updated_at":"2026-07-15T19:06:39.943Z","avatar_url":"https://github.com/santisq.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EncodeMessage\n\nA fun exercise at encoding and decoding strings with [PowerShell classes](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_classes).\n\n## `Encode` Class\n\n### Constructors\n\n| Command | Description |\n| ----------- | ---- |\n| `[Encode](string)` | Initializes a new instance of the `Encode` class encoding the _string_ with the default `EncodingComplexity` value. |\n| `[Encode](string, 4)` \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; | Initializes a new instance of the `Encode` class encoding the _string_ with a `EncodingComplexity` value of 4. |\n\n### Properties\n\n| Name | Description |\n| ---- | ---- |\n| `EncodingComplexity` | The value of this property is multiplied by the `Length` of the _input string_ to generate a new encoded message. __Default value 3__. |\n| `EncodedMessage` | This property holds the value of the encoded message. |\n| `Map` | The `int` array needed to decoded the message. |\n\n## `Decode` Class\n\n### Methods\n\n| Command | Description |\n| ---- | ---- |\n| `DecodeMessage(Encode)` | Takes an object of the class `Encode` as argument to decode the message. |\n| `DecodeMessage(string, int[])` | Takes an _encoded string_ and the Map a assumes default Encoding Complexity to decode the message. |\n| `DecodeMessage(string, int[], int)` \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; | Takes an _encoded string_, the Map and the Encoding Complexity to decode the message. |\n\n## Usage\n\n### Encoding a message with default Encoding Complexity\n\n```\nPS /\u003e $message = 'hello world 123!'\nPS /\u003e $enc = [Encode] $message\nPS /\u003e $enc\n\nEncodingComplexity EncodedMessage                                   Map\n------------------ --------------                                   ---\n                 3 IW}o: Fh\u0026eoWPsobO|ur3GFK!kllNh+dHfS1hI821 lDhXwm {44, 9, 27, 42…}\n```\n\n### Encoding a message with custom Encoding Complexity\n\n```\nPS /\u003e $enc = [Encode]::new('hello world 123!', 4)\nPS /\u003e $enc\n\nEncodingComplexity EncodedMessage                                                   Map\n------------------ --------------                                                   ---\n                 4 U8dj^^2x{-_3dr0aVyC!aP?DHl}lKGBY2tdmt6P1o%/h27oe.Th l 8ZZ39mwb|3 {50, 47, 25, 52…}\n```\n\n### Decoding a message using a `Encode` object\n\n```powershell\nPS /\u003e $enc = [Encode]::new('hello world 123!', 4)\nPS /\u003e [Decode]::DecodeMessage($enc)\n\nhello world 123!\n```\n\n### Decoding a message with a Map\n\n```powershell\nPS /\u003e $enc = [Encode] 'hello world 123!'\nPS /\u003e [Decode]::DecodeMessage($enc.EncodedMessage, $enc.Map)\n\n'hello world 123!'\n````\n\n### Decoding a message with a Map and custom Encoding Complexity\n\n```powershell\nPS /\u003e $message = 'hello world 123!'\nPS /\u003e $enc = [Encode]::new($message, 5)\nPS /\u003e [Decode]::DecodeMessage($enc.EncodedMessage, $enc.Map, $enc.EncodingComplexity)\n\n'hello world 123!'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantisq%2Fencodemessage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantisq%2Fencodemessage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantisq%2Fencodemessage/lists"}