{"id":39896561,"url":"https://github.com/knjcode/string-codec","last_synced_at":"2026-01-18T15:08:18.594Z","repository":{"id":28590207,"uuid":"32108379","full_name":"knjcode/string-codec","owner":"knjcode","description":"Encoder/Decoder of various algorithm","archived":false,"fork":false,"pushed_at":"2016-10-20T14:35:27.000Z","size":59,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-10T10:57:50.709Z","etag":null,"topics":["string-algorithms"],"latest_commit_sha":null,"homepage":"","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/knjcode.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}},"created_at":"2015-03-12T23:13:56.000Z","updated_at":"2020-10-02T06:36:21.000Z","dependencies_parsed_at":"2022-09-01T17:31:52.658Z","dependency_job_id":null,"html_url":"https://github.com/knjcode/string-codec","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/knjcode/string-codec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knjcode%2Fstring-codec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knjcode%2Fstring-codec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knjcode%2Fstring-codec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knjcode%2Fstring-codec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knjcode","download_url":"https://codeload.github.com/knjcode/string-codec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knjcode%2Fstring-codec/sbom","scorecard":{"id":564586,"data":{"date":"2025-08-11","repo":{"name":"github.com/knjcode/string-codec","commit":"cc61a4a7acabc336181de17a18521ea7d61b70ac"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T14:38:06.847Z","repository_id":28590207,"created_at":"2025-08-20T14:38:06.847Z","updated_at":"2025-08-20T14:38:06.847Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28539007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["string-algorithms"],"created_at":"2026-01-18T15:08:18.028Z","updated_at":"2026-01-18T15:08:18.589Z","avatar_url":"https://github.com/knjcode.png","language":"JavaScript","readme":"# string-codec\n\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]\n\nEncoder/Decoder of various algorithm\n\n## Installation\n\nvia [npm (node package manager)](http://github.com/npm/npm)\n\n    $ npm install string-codec\n\n## Usage Example\n\nRequire package:\n\n    var codec = require('string-codec');\n\nEncode to Base64:\n\n    codec.encoder('hello','base64');\n    // =\u003e 'aGVsbG8='\n\nDecode from Base64:\n\n    codec.decoder('aGVsbG8=','base64');\n    // =\u003e 'hello'\n\nEncode Buffer to Base64:\n\n    buffer = new Buffer('hello');\n    // =\u003e \u003cBuffer 68 65 6c 6c 6f\u003e\n    encbuf = codec.bufferEncoder(buffer,'base64');\n    // =\u003e \u003cBuffer 61 47 56 73 62 47 38 3d\u003e\n    encbuf.toString();\n    // =\u003e 'aGVsbG8='\n    \n    decbuf = codec.bufferDecoder(encbuf,'base64');\n    // =\u003e \u003cBuffer 68 65 6c 6c 6f\u003e\n    decbuf.toString();\n    // =\u003e 'hello'\n\nList supported algorithm:\n\n    var codec = require('string-codec');\n    \n    // list array of encoding algorithm\n    codec.ENC_ALGOS\n    // =\u003e [\"hex\",\"ascii\",\"base64\",\"base85\",\"z85\",\"ascii85\",\"base91\",\"rot5\",\n           \"rot13\", \"rot18\", \"rot47\",\"rev\",\"crc1\",\"crc8\",\"crc16\",\"crc24\",\n           \"crc32\",\"adler32\",\"url\",\"unixtime\",\"lower\",\"upper\",\"punycode\", etc.\n    \n    // list array of decoding algorithm\n    codec.DEC_ALGOS\n    // =\u003e [\"hex\",\"ascii\",\"base64\",\"base85\",\"z85\",\"ascii85\",\"base91\",\"rot5\",\n           \"rot13\",\"rot18\",\"rot47\",\"rev\",\"url\",\"unixtime\",\"punycode\", etc.\n\n## API\n\n__encoder(String input, String algorithm)__\n\nencode input with specified algorithm\n\n__bufferEncoder(Buffer input, String algorithm)__\n\nencode input buffer with specified algorithm\n\n__decoder(String input, String algorithm)__\n\ndecode input with specified algorithm\n\n__bufferDecoder(Buffer input, String algorithm)__\n\ndecode input buffer with specified algorithm\n\n__ENC_ALGOS__\n\nlist supported encoding algorithm\n\n__ENC_HASHES__\n\nlist supported hash algorithm\n\n__ENC_ALL__\n\nlist all supported encoding algorithm (ENC_ALGOS + ENC_HASHES)\n\n__DEC_ALGOS__\n\nlist supported decoding algorithm\n\n__DEC_HASHES__\n\nlist supported hash decryption algorithm\n\n__DEC_ALL__\n\nlist all supported decoding algorithm (DEC_ALGOS + DEC_HASHES)\n\n## Supported specifications\n\n### encoder / bufferEncoder\n\n__encoder__ requires string input and outputs string\n\n__bufferEncoder__ requires Buffer input and outputs Buffer\n\n|algorithm|input|output|\n|:--|:--|:--|\n|hex|string|hex string|\n|ascii|hex string|string|\n|unixtime|date string|unix timestamp|\n|rot5/rot13/rot18/rot47\u003cbr\u003erev (reverse string)\u003cbr\u003eurl (url encoding)\u003cbr\u003elower\u003cbr\u003eupper\u003cbr\u003epunycode|string|string|\n|base64\u003cbr\u003ebase85 (z85)\u003cbr\u003eascii85\u003cbr\u003ebase91\u003cbr\u003ecrc1/crc8/crc16/crc24/crc32\u003cbr\u003eadler32\u003cbr\u003emd4\u003cbr\u003emd5\u003cbr\u003esha\u003cbr\u003esha1\u003cbr\u003esha224\u003cbr\u003esha256\u003cbr\u003esha384\u003cbr\u003esha512\u003cbr\u003ermd160\u003cbr\u003ewhirlpool|string\u003cbr\u003eor\u003cbr\u003eBuffer|string\u003cbr\u003eor\u003cbr\u003eBuffer|\n\n### decode / bufferDecoder\n\n__decoder__ requires string input and outputs string\n\n__bufferDecoder__ requires Buffer input and outputs Buffer\n\n|algorithm|input|output|\n|:--|:--|:--|\n|hex|hex string|string|\n|ascii|string|hex string|\n|unixtime|unix timestamp|date string|\n|rot5/rot13/rot18/rot47\u003cbr\u003erev\u003cbr\u003eurl\u003cbr\u003epunycode|string|string|\n|base64\u003cbr\u003ebase85 (z85)\u003cbr\u003eascii85\u003cbr\u003ebase91\u003cbr\u003emd5|string\u003cbr\u003eor\u003cbr\u003eBuffer|string\u003cbr\u003eor\u003cbr\u003eBuffer|\n\n### Input hex string\n\nAccept hex string prefixed with '0x' or separated by a colon (:)\n\n    codec.decoder('616263','hex');\n    // =\u003e abc\n    codec.decoder('0x616263','hex');\n    // =\u003e abc\n    codec.decoder('61:62:63','hex');\n    // =\u003e abc\n    codec.decoder('0x61:62:63','hex');\n    // =\u003e abc\n\n## Running tests\n\n    $ git clone https://github.com/knjcode/string-codec.git\n    $ cd string-codec\n    $ npm install\n    $ npm test\n\n## Acknowledgements\n\n- @_rintaro_f\n- @inaz2\n- basE91 based on [mscdex/base91.js](https://github.com/mscdex/base91.js)\n- Ascii85(base85)/z85(ZeroMQ) [huandu/node-ascii85](https://github.com/huandu/node-ascii85)\n- rot5/rot13/rot18/rot47 [schnittstabil/caesar-salad](https://github.com/schnittstabil/caesar-salad)\n- crc1/crc8/crc16/crc24/crc32 [alexgorbatchev/node-crc](https://github.com/alexgorbatchev/node-crc)\n- adler32 [SheetJS/js-adler32](https://github.com/SheetJS/js-adler32)\n- MD5 decrypter [MD5-hash.com](http://www.md5-hash.com)\n\n[npm-url]: https://npmjs.org/package/string-codec\n[npm-image]: https://badge.fury.io/js/string-codec.svg\n[travis-url]: https://travis-ci.org/knjcode/string-codec\n[travis-image]: https://travis-ci.org/knjcode/string-codec.svg?branch=master\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknjcode%2Fstring-codec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknjcode%2Fstring-codec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknjcode%2Fstring-codec/lists"}