{"id":15142800,"url":"https://github.com/muqsit/rpencrypter","last_synced_at":"2025-07-18T07:03:17.482Z","repository":{"id":219978792,"uuid":"750435255","full_name":"Muqsit/RPEncrypter","owner":"Muqsit","description":"Encrypts loaded Minecraft: Bedrock Edition resource packs (PocketMine-MP plugin)","archived":false,"fork":false,"pushed_at":"2024-09-15T07:49:43.000Z","size":33,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T19:38:00.974Z","etag":null,"topics":["pmmp","pmmp-plugin","pocketmine-plugin","poggit","resourcepack"],"latest_commit_sha":null,"homepage":"https://poggit.pmmp.io/p/RPEncrypter","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Muqsit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"funding.yml","license":"LICENSE","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},"funding":{"github":"Muqsit"}},"created_at":"2024-01-30T16:34:40.000Z","updated_at":"2024-10-05T10:45:59.000Z","dependencies_parsed_at":"2025-02-08T22:32:12.956Z","dependency_job_id":"c7baf50d-d8c4-4c69-9848-650b9b33b63d","html_url":"https://github.com/Muqsit/RPEncrypter","commit_stats":null,"previous_names":["muqsit/rpencrypter"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Muqsit/RPEncrypter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muqsit%2FRPEncrypter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muqsit%2FRPEncrypter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muqsit%2FRPEncrypter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muqsit%2FRPEncrypter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Muqsit","download_url":"https://codeload.github.com/Muqsit/RPEncrypter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muqsit%2FRPEncrypter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265716306,"owners_count":23816354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["pmmp","pmmp-plugin","pocketmine-plugin","poggit","resourcepack"],"created_at":"2024-09-26T10:00:38.684Z","updated_at":"2025-07-18T07:03:17.429Z","avatar_url":"https://github.com/Muqsit.png","language":"PHP","funding_links":["https://github.com/sponsors/Muqsit"],"categories":[],"sub_categories":[],"readme":"# RPEncrypter\nA PocketMine-MP plugin that automatically encrypts all loaded resource packs.\n\n[![](https://poggit.pmmp.io/shield.state/RPEncrypter)](https://poggit.pmmp.io/p/RPEncrypter)\n[![](https://poggit.pmmp.io/shield.api/RPEncrypter)](https://poggit.pmmp.io/p/RPEncrypter)\n[![](https://poggit.pmmp.io/shield.dl.total/RPEncrypter)](https://poggit.pmmp.io/p/RPEncrypter)\n\nJust install the plugin and restart your server. All loaded resource packs (such as ones defined in your `resource_packs/resource_packs.yml`) will automatically be encrypted. This plugin uses your machine ID as the encryption key.\n\n## API\n[`ResourcePackEncrypter::encrypt()`](https://github.com/Muqsit/RPEncrypter/blob/master/src/muqsit/rpencrypter/ResourcePackEncrypter.php) encrypts resource packs with the supplied encryption-key.\n\n```php\n/** @var PluginBase $plugin */\n\n// encrypt MyResourcePack.zip\n$rp_path = $plugin-\u003egetDataFolder() . DIRECTORY_SEPARATOR . \"MyResourcePack.zip\";\n$encryption_key = openssl_random_pseudo_bytes(32, $strong_result);\n$file_encryption_keygen = fn(string $path, string $contents) =\u003e md5($path . $contents);\n\n$encrypter = new ResourcePackEncrypter($plugin-\u003egetDataFolder());\n$info = $encrypter-\u003eencryptZip(new ZipArchive($rp_path), $encryption_key, $file_encryption_keygen);\n\n// register encrypted resource pack\n$manager = $plugin-\u003egetServer()-\u003egetResourcePackManager();\n$stack = $manager-\u003egetResourceStack();\n$stack[] = $info-\u003epack;\n$manager-\u003esetResourceStack($stack);\n$manager-\u003esetPackEncryptionKey($info-\u003epack-\u003egetPackId(), $encryption_key);\n```\n\nTo generate static encryption keys (instead of random keys), consider using your machine ID.\n```php\nuse pocketmine\\utils\\Utils;\n\n$machine_id = Utils::getMachineUniqueId()-\u003egetBytes();\n$encryption_key = md5($machine_id); // 32-byte encryption key\n```\n\nAlternatively, generate a 32-length random string via [1Password](https://1password.com/password-generator/) and store it on your server somewhere.\n```php\n$encryption_key = \"6]xFaeMs9b)UnybZ?raH]*)PJ.Jx!3:0\";\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuqsit%2Frpencrypter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuqsit%2Frpencrypter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuqsit%2Frpencrypter/lists"}