{"id":15025902,"url":"https://github.com/eiblybrasil/php-crypt","last_synced_at":"2026-02-05T08:01:17.343Z","repository":{"id":171004654,"uuid":"491740015","full_name":"eiblybrasil/PHP-Crypt","owner":"eiblybrasil","description":"A simple php class for encryption.","archived":false,"fork":false,"pushed_at":"2022-05-20T20:59:03.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-20T15:24:44.699Z","etag":null,"topics":["class","cryptography","php","php72","php73","php74","php80","php81"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eiblybrasil.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":"2022-05-13T03:07:21.000Z","updated_at":"2022-05-13T03:55:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"3dda498e-e31d-415f-a010-2242572d7933","html_url":"https://github.com/eiblybrasil/PHP-Crypt","commit_stats":null,"previous_names":["eiblybrasil/php-crypt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eiblybrasil/PHP-Crypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiblybrasil%2FPHP-Crypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiblybrasil%2FPHP-Crypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiblybrasil%2FPHP-Crypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiblybrasil%2FPHP-Crypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eiblybrasil","download_url":"https://codeload.github.com/eiblybrasil/PHP-Crypt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eiblybrasil%2FPHP-Crypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29116450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T05:31:32.482Z","status":"ssl_error","status_checked_at":"2026-02-05T05:31:29.075Z","response_time":65,"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":["class","cryptography","php","php72","php73","php74","php80","php81"],"created_at":"2024-09-24T20:03:18.003Z","updated_at":"2026-02-05T08:01:17.264Z","avatar_url":"https://github.com/eiblybrasil.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Using\n```php\n\u003c?php\nuse Eibly\\Crypt\\Crypt;\n\n// function __construct(string $key = \"\", bool $salt = true, string $hash = \"sha256\", string $method = \"aes-256-cbc\")\n$crypt = new Crypt(\"your secret key\");\n\n// function encrypt(string $string): string\n$value = $crypt-\u003eencrypt(\"content\");\n// Result: $value = MDI2NTYwYTM5N2FiZWY0MDRmM2I5ZDU2OTM5OTg!NmRiZTYVZAuvIFt2Xm@eVug0eN)!A\n\n// function decrypt(string $string): ?string\n$decrypted_value = $crypt-\u003edecrypt($value);\n// Result: $decrypted_value = content\n```\n\n## Warnings:\nBy default the salt mode will be used, but be careful.\nWhen running the first time, it will create a json file with an array of salts.\nOnce stored, it will be used to decrypt. Be aware that deleting the file will make it impossible to decrypt the string in the future.\n\n## Functions\n```php\nfunction setSaltStatus(bool $salt): void {...}\nfunction getSaltStatus(): bool {...}\nfunction setHash(string $hash): void {...}\nfunction getHash(): string {...}\nfunction setKey(string $key): void {...}\nfunction getKey(): string {...}\nfunction setMethod(string $method): void {...}\nfunction getMethod(): string {...}\nfunction doGenerateSalts(int $c = 16, int $l = 8): array {...}\nfunction doGenerateSalt(int $len = 8): array {...}\nfunction encrypt(string $string): string {...}\nfunction decrypt(string $string): ?string {...}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiblybrasil%2Fphp-crypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feiblybrasil%2Fphp-crypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feiblybrasil%2Fphp-crypt/lists"}