{"id":19923669,"url":"https://github.com/iliazeus/static-secret","last_synced_at":"2025-09-19T04:32:26.412Z","repository":{"id":218044460,"uuid":"745448319","full_name":"iliazeus/static-secret","owner":"iliazeus","description":"a simple-to-use script for embedding secret password-encrypted data into static web pages","archived":false,"fork":false,"pushed_at":"2024-01-19T12:27:24.000Z","size":503,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-10T21:07:24.225Z","etag":null,"topics":["encryption","javascript","web-crypto-api"],"latest_commit_sha":null,"homepage":"https://iliazeus.github.io/static-secret/encrypt.html","language":"JavaScript","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/iliazeus.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}},"created_at":"2024-01-19T11:02:27.000Z","updated_at":"2025-07-04T04:18:44.000Z","dependencies_parsed_at":"2024-01-19T12:25:16.810Z","dependency_job_id":"424ad115-3548-43c7-8ceb-0bbb5c350619","html_url":"https://github.com/iliazeus/static-secret","commit_stats":null,"previous_names":["iliazeus/static-secret"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iliazeus/static-secret","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iliazeus%2Fstatic-secret","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iliazeus%2Fstatic-secret/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iliazeus%2Fstatic-secret/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iliazeus%2Fstatic-secret/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iliazeus","download_url":"https://codeload.github.com/iliazeus/static-secret/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iliazeus%2Fstatic-secret/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275881573,"owners_count":25545398,"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","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"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":["encryption","javascript","web-crypto-api"],"created_at":"2024-11-12T22:15:01.858Z","updated_at":"2025-09-19T04:32:26.136Z","avatar_url":"https://github.com/iliazeus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# static-secret.js\n\n`static-secret` is a simple-to-use script for embedding _secret_ password-encrypted data into _static_ web pages.\n\n## Usage\n\n### Encryption\n\nThere's a [browser tool].\n\n[browser tool]: https://iliazeus.github.io/static-secret/encrypt.html\n\nSave both the encrypted file and the `data-static-secret` value.\n\n### Embedding with auto-decryption\n\nFirst, add the script to your web page. You can either reference the GitHub-hosted version:\n\n\u003c!-- prettier-ignore --\u003e\n```html\n\u003cscript type=\"module\" src=\"https://iliazeus.github.io/static-secret/static-secret.js#decrypt\"\u003e\u003c/script\u003e\n```\n\nOr you can \u003ca download href=\"https://iliazeus.github.io/static-secret/static-secret.js\"\u003edownload the script\u003c/a\u003e, put it beside your page and reference your copy:\n\n\u003c!-- prettier-ignore --\u003e\n```html\n\u003cscript type=\"module\" src=\"./static-secret.js#decrypt\"\u003e\u003c/script\u003e\n```\n\nDo not remove the `#decrypt` parameter - that's what enables the auto-decryption feature, so you don't have to write any JavaScript yourself.\n\nThen, embed the encrypted data:\n\n\u003c!-- prettier-ignore --\u003e\n```html\nembedding images, audios and videos:\n\u003cimg src=\"file.png.encrypted\" data-static-secret=\"your-value-here\"\u003e\n\u003caudio src=\"file.ogg.encrypted\" data-static-secret=\"your-value-here\"\u003e\u003c/audio\u003e\n\u003cvideo src=\"file.mp4.encrypted\" data-static-secret=\"your-value-here\"\u003e\u003c/video\u003e\n\nembedding downloadable files:\n\u003ca download href=\"file.png.encrypted\" data-static-secret=\"your-value-here\"\u003eDownload!\u003c/a\u003e\n\nencrypting the contents themselves:\n\u003cdiv data-static-secret=\"your-value-here\"\u003e\nbase64 encrypted contents here (check the \"Get base64-encoded contents\" box).\n\u003c/div\u003e\n```\n\nTo view encrypted files, you will need the same password that was used for encryption. By default, you pass it via the `#p=` parameter, as in this example:\n\nhttps://iliazeus.github.io/static-secret/example.html#p=kodak\n\n### Advanced\n\nFor advanced usage, consult the [source code].\n\n[source code]: ./static-secret.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filiazeus%2Fstatic-secret","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filiazeus%2Fstatic-secret","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filiazeus%2Fstatic-secret/lists"}