{"id":23968637,"url":"https://github.com/vutran/websocket-handshake","last_synced_at":"2026-04-30T02:34:37.161Z","repository":{"id":143928551,"uuid":"66213379","full_name":"vutran/websocket-handshake","owner":"vutran","description":"Simple utility to generate a websocket handshake hash/response.","archived":false,"fork":false,"pushed_at":"2016-08-21T18:20:31.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T09:06:07.399Z","etag":null,"topics":["handshake","javascript","node","websocket"],"latest_commit_sha":null,"homepage":null,"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/vutran.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":"2016-08-21T18:10:52.000Z","updated_at":"2016-10-24T13:50:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"f810d341-189d-4abc-a343-60b6d9daadc1","html_url":"https://github.com/vutran/websocket-handshake","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwebsocket-handshake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwebsocket-handshake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwebsocket-handshake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwebsocket-handshake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vutran","download_url":"https://codeload.github.com/vutran/websocket-handshake/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vutran%2Fwebsocket-handshake/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258789684,"owners_count":22758354,"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":["handshake","javascript","node","websocket"],"created_at":"2025-01-07T00:15:33.885Z","updated_at":"2026-04-30T02:34:32.140Z","avatar_url":"https://github.com/vutran.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# websocket-handshake\n\n\u003e Simple utility to generate a websocket handshake hash/response.\n\n## Install\n\n```bash\n$ npm install --save websocket-handshake\n```\n\n## Usage\n\nImport the module\n\n```js\nconst { getResponseHash, getResponseHeaders } = require('websocket-handshake');\n```\n\nCreate the handshake response hash\n\n```js\nconst hash = getResponseHash('dGhlIHNhbXBsZSBub25jZQ==');\n// =\u003e s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\n```\n\nCreate the handshake response headers\n\n```js\nconst request = { ... }; // instance of http.ServerRequest\nconst headers = getResponseHeaders(request);\n// =\u003e HTTP/1.1 101 Switching Protocols\n//    Upgrade: websocket\n//    Connection: Upgrade\n//    Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=\n```\n\n## License\n\nMIT © [Vu Tran](https://github.com/vutran/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvutran%2Fwebsocket-handshake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvutran%2Fwebsocket-handshake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvutran%2Fwebsocket-handshake/lists"}