{"id":15429483,"url":"https://github.com/jedisct1/as-hmac-sha2","last_synced_at":"2025-04-19T16:53:32.788Z","repository":{"id":57184520,"uuid":"367071776","full_name":"jedisct1/as-hmac-sha2","owner":"jedisct1","description":"SHA-256, SHA-512, HMAC-SHA-256, HMAC-SHA-512 for AssemblyScript.","archived":false,"fork":false,"pushed_at":"2022-09-23T11:03:39.000Z","size":15,"stargazers_count":15,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T10:33:31.605Z","etag":null,"topics":["assemblyscript","hmac","sha256","sha512"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jedisct1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-13T14:19:19.000Z","updated_at":"2025-02-11T13:11:32.000Z","dependencies_parsed_at":"2022-09-14T09:00:51.489Z","dependency_job_id":null,"html_url":"https://github.com/jedisct1/as-hmac-sha2","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fas-hmac-sha2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fas-hmac-sha2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fas-hmac-sha2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Fas-hmac-sha2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedisct1","download_url":"https://codeload.github.com/jedisct1/as-hmac-sha2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249574008,"owners_count":21293205,"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":["assemblyscript","hmac","sha256","sha512"],"created_at":"2024-10-01T18:10:41.182Z","updated_at":"2025-04-19T16:53:32.769Z","avatar_url":"https://github.com/jedisct1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HMAC-SHA-256 and HMAC-SHA-512 for AssemblyScript\n\nSelf-contained implementations of SHA-256, SHA-512, HMAC-SHA-256 and HMAC-SHA-512 for AssemblyScript.\n\nSimple hashing:\n\n```typescript\nlet msg = Uint8Array.wrap(String.UTF8.encode(\"test\"));\nlet h = Sha256.hash(msg);\n```\n\nChunked input:\n\n```typescript\nlet st = new Sha256();\nst.update(msg1);\nst.update(msg2);\nlet h = st.final();\n```\n\nHMAC:\n\n```typescript\nlet msg = Uint8Array.wrap(String.UTF8.encode(\"message\"));\nlet key = Uint8Array.wrap(String.UTF8.encode(\"key\"));\nlet mac = Sha256.hmac(msg, key);\n```\n\nConstant-time check for equality:\n\n```typescript\nlet ok = verify(mac, expected_mac);\n```\n\nConstant-time hexadecimal encoding/decoding:\n\n```typescript\nlet hex = bin2hex(h);\nlet bin = hex2bin(hex);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Fas-hmac-sha2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedisct1%2Fas-hmac-sha2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Fas-hmac-sha2/lists"}