{"id":18495684,"url":"https://github.com/shiwildy/sencrypt","last_synced_at":"2026-01-27T01:34:00.951Z","repository":{"id":261420017,"uuid":"882388375","full_name":"shiwildy/SEncrypt","owner":"shiwildy","description":"A secure and simple encryption library using SHA-512, AES-256-CBC, and BASE64","archived":false,"fork":false,"pushed_at":"2024-11-02T18:23:00.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T00:57:47.500Z","etag":null,"topics":["encryption","encryptor","library","pehape","php","php8","phpencrypt","phplang","phplibrary","sencrypt"],"latest_commit_sha":null,"homepage":"https://github.com/shiwildy/SEncrypt","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shiwildy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-11-02T17:44:51.000Z","updated_at":"2025-01-02T20:16:36.000Z","dependencies_parsed_at":"2024-11-06T13:45:03.055Z","dependency_job_id":"7b00f1ed-97d2-41a4-a5a5-240ef5cd1b1a","html_url":"https://github.com/shiwildy/SEncrypt","commit_stats":null,"previous_names":["shiwildy/sencrypt"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shiwildy/SEncrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiwildy%2FSEncrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiwildy%2FSEncrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiwildy%2FSEncrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiwildy%2FSEncrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shiwildy","download_url":"https://codeload.github.com/shiwildy/SEncrypt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiwildy%2FSEncrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28795468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"ssl_error","status_checked_at":"2026-01-27T01:07:06.974Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["encryption","encryptor","library","pehape","php","php8","phpencrypt","phplang","phplibrary","sencrypt"],"created_at":"2024-11-06T13:25:51.360Z","updated_at":"2026-01-27T01:34:00.924Z","avatar_url":"https://github.com/shiwildy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SEncrypt\nSEncrypt is a secure \u0026 simple encryption library using SHA-512, AES-256-CBC, and BASE64. It provides easy-to-use methods for encrypting and decrypting data securely.\n\n## Installation\n```bash\ncomposer require shiwildy/sencrypt\n```\n\n## Example\n```php\n\u003c?php\n    require 'vendor/autoload.php';\n    use ShiWildy\\SEncrypt;\n\n    $plaintext = \"Hello, just testing..\";\n    $password = \"secret\";\n\n    try {\n        $encrypted = SEncrypt::encrypt($plaintext, $password);\n        echo \"Encrypted: \" . $encrypted . \"\\n\\n\";\n\n        $decrypted = SEncrypt::decrypt($encrypted, $password);\n        echo \"Decrypted: \" . $decrypted . \"\\n\\n\";\n\n    } catch (Exception $e) {\n        echo \"An error occurred: \" . $e-\u003egetMessage() . \"\\n\";\n    }\n?\u003e\n```\n\n## How It Works ?\n### Encryption:\n- Salt Generation: A random salt generated to enhance security.\n- Key Derivation: Encryption key is derived from the provided password and generated salt using PBKDF2 Algoritm with SHA-512\n- IV Generation: A random initialization vector [IV] generated for use on AES-256-CBC\n- Combining Data: Salt, IV, and encrypted data are concatenated and then encoded using base64 to create final encrypted output.\n\n### Decryption:\n- Base64 Decode: Encrypted data is first decoded from Base64.\n- Data Extraction: salt, IV, and encrypted text are extracted from decoded data.\n- Key Derivation: Decryption key is derived using same method in encryption.\n- Decryption: Encrypted data is decrypted using derived key and IV.\n- Output: Decrypted text returned.\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.\n\n## License\nThis project licensed under The MIT License\n\n## Credits\n- https://www.php.net/manual/en/function.hash-pbkdf2.php\n- https://www.tutorialspoint.com/php/php_function_hash_pdkdf2.htm\n- https://www.php.net/manual/en/function.openssl-pbkdf2.php\n- https://stackoverflow.com/questions/12766852/pbkdf2-password-hashing-for-php\n- https://ppgia.pucpr.br/pt/arquivos/techdocs/php/function.hash-pbkdf2.html\n- https://nishothan-17.medium.com/pbkdf2-hashing-algorithm-841d5cc9178d\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiwildy%2Fsencrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiwildy%2Fsencrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiwildy%2Fsencrypt/lists"}