{"id":19778325,"url":"https://github.com/npkgz/modhex","last_synced_at":"2026-02-13T10:57:40.012Z","repository":{"id":57300545,"uuid":"94608819","full_name":"npkgz/modhex","owner":"npkgz","description":"modhex encoding/decoding used by Yubico-OTP Authentication","archived":false,"fork":false,"pushed_at":"2023-07-19T02:38:50.000Z","size":96,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-11T11:05:32.944Z","etag":null,"topics":["authentication","javascript","modhex","nodejs","otp","yubico","yubico-otp","yubikey"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/modhex","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/npkgz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-17T07:46:55.000Z","updated_at":"2023-09-23T03:05:00.000Z","dependencies_parsed_at":"2022-09-09T13:22:02.945Z","dependency_job_id":null,"html_url":"https://github.com/npkgz/modhex","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/npkgz%2Fmodhex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npkgz%2Fmodhex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npkgz%2Fmodhex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npkgz%2Fmodhex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npkgz","download_url":"https://codeload.github.com/npkgz/modhex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224223966,"owners_count":17276283,"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","javascript","modhex","nodejs","otp","yubico","yubico-otp","yubikey"],"created_at":"2024-11-12T05:28:55.461Z","updated_at":"2026-02-13T10:57:34.986Z","avatar_url":"https://github.com/npkgz.png","language":"JavaScript","readme":"[![Build Status](https://travis-ci.org/AndiDittrich/Node.modhex.svg?branch=master)](https://travis-ci.org/AndiDittrich/Node.modhex)\n\nmodhex\n=========================\n\n[modhex](https://developers.yubico.com/yubico-c/Manuals/modhex.1.html) encoding/decoding used by [Yubico-OTP Authentication](https://developers.yubico.com/OTP/)\n\n```\nyarn add modhex --save\n```\n\nFeatures\n------------------------------\n\n* Encode Data to modhex\n* Decode modhex Strings \n\nAPI\n------------------------------\n\n * [encode](#encode) - Encode Data to modhex\n * [decode](#decode) - Decode modhex Strings \n\n\nencode\n------------------------------\n\n**Description:** Encode Data to modhex\n\n**Syntax:** `data:ModhexString = encode(data:HexString|Buffer)`\n\n**Arguments:**\n\n * data:HexString|Buffer - Input data as hex-String or Buffer\n\n**Example:**\n\n```js\nconst _modex = require('modhex');\n\n// encode hex data\nconst data0 = _modex.encode('5834b135dc124d38c');\n\n// encode buffer\nconst mybuffer = Buffer.from('5834b135dc124d38c', 'hex');\nconst data1 = _modhex.encode(mybuffer);\n```\n\ndecode\n------------------------------\n\n**Description:** Decode modhex Strings \n\n**Syntax:** `data:HexString|Buffer = decode(data:ModhexString, [encoding:String])`\n\n**Arguments:**\n\n * data:ModhexString - Input data as modhex\n * encoding:String(optional) - Output encoding {**hex**, **buffer**} default: hex\n\n**Example:**\n\n```js\nconst _modex = require('modhex');\n\n// decode modhex data to hex\nconst data0 = _modex.encode('iijbeetrkrtlghuddhdhhjdej');\n\n// decode modhex to buffer\nconst data1 = _modhex.encode('iijbeetrkrtlghuddhdhhjdej', 'buffer');\n```\n\nAny Questions ? Report a Bug ? Enhancements ?\n---------------------------------------------\nPlease open a new issue on [GitHub](https://github.com/AndiDittrich/Node.modhex/issues)\n\nLicense\n-------\nmodhex is OpenSource and licensed under the Terms of [The MIT License](LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpkgz%2Fmodhex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpkgz%2Fmodhex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpkgz%2Fmodhex/lists"}