{"id":21457785,"url":"https://github.com/wojtekb30/fibaro-lua-hmac_sha256","last_synced_at":"2025-03-17T04:10:45.111Z","repository":{"id":262628377,"uuid":"885960737","full_name":"Wojtekb30/Fibaro-LUA-HMAC_SHA256","owner":"Wojtekb30","description":"Pure LUA 5.2 implementation of HMAC_SHA256 algorithm, works in Fibaro Home Center 3.","archived":false,"fork":false,"pushed_at":"2024-11-09T21:09:47.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T13:33:02.718Z","etag":null,"topics":["authentication-backend","fibaro","fibaro-hc3","fibaro-home-center","hmac-authentication","hmac-sha256","lua"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/Wojtekb30.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-09T20:56:57.000Z","updated_at":"2024-11-10T14:17:43.000Z","dependencies_parsed_at":"2024-11-13T13:19:01.683Z","dependency_job_id":"799441b5-2142-4171-8678-c7f4479dcb3f","html_url":"https://github.com/Wojtekb30/Fibaro-LUA-HMAC_SHA256","commit_stats":null,"previous_names":["wojtekb30/fibaro-lua-hmac_sha256"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wojtekb30%2FFibaro-LUA-HMAC_SHA256","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wojtekb30%2FFibaro-LUA-HMAC_SHA256/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wojtekb30%2FFibaro-LUA-HMAC_SHA256/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wojtekb30%2FFibaro-LUA-HMAC_SHA256/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wojtekb30","download_url":"https://codeload.github.com/Wojtekb30/Fibaro-LUA-HMAC_SHA256/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971193,"owners_count":20376784,"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":["authentication-backend","fibaro","fibaro-hc3","fibaro-home-center","hmac-authentication","hmac-sha256","lua"],"created_at":"2024-11-23T06:07:03.543Z","updated_at":"2025-03-17T04:10:45.092Z","avatar_url":"https://github.com/Wojtekb30.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fibaro-HMAC_SHA256\nPure LUA 5.2 implementation of HMAC_SHA256 algorithm, works in Fibaro Home Center 3. Also contains code for generating SHA256 of a string.\n\nPaste the code into your LUA 5.2 script or Fibaro HC3 LUA scene, and then use hmac_sha256() function to have the string encrypted with HMAC_SHA256. Or use sha256() to generate SHA256 of a string.\n\nUseful for making API calls, for example those with Tuya API. HMAC_SHA256 is used in authentication.\n\nUsage example for hmac_256 (assuming the whole function code was copied and pasted into the script):\n\nlocal client_id = \"abc\"\n\nlocal secret = \"abcdefgh\"\n\nlocal timestamp = \"123\" --Current time in miliseconds\n\nlocal nonce = \"456abce\" --Random value like Python os.urandom(16) would return\n\nlocal message = client_id .. timestamp .. nonce\n\nprint(\"Message:\", message)\n\nlocal signature = hmac_sha256(secret, message) --first key, then content, both strings\n\nprint(\"Generated Signature:\", signature)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwojtekb30%2Ffibaro-lua-hmac_sha256","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwojtekb30%2Ffibaro-lua-hmac_sha256","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwojtekb30%2Ffibaro-lua-hmac_sha256/lists"}