{"id":17108999,"url":"https://github.com/reklatsmasters/pem-file","last_synced_at":"2025-07-24T16:30:48.287Z","repository":{"id":57321868,"uuid":"132094048","full_name":"reklatsmasters/pem-file","owner":"reklatsmasters","description":"PEM file format encoder/decoder.","archived":false,"fork":false,"pushed_at":"2018-12-15T19:38:47.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-20T13:08:06.418Z","etag":null,"topics":["crypto","js","node","nodejs","pem"],"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/reklatsmasters.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":"2018-05-04T05:54:06.000Z","updated_at":"2018-12-15T19:38:48.000Z","dependencies_parsed_at":"2022-08-25T20:00:20.582Z","dependency_job_id":null,"html_url":"https://github.com/reklatsmasters/pem-file","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/reklatsmasters%2Fpem-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reklatsmasters%2Fpem-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reklatsmasters%2Fpem-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reklatsmasters%2Fpem-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reklatsmasters","download_url":"https://codeload.github.com/reklatsmasters/pem-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227456282,"owners_count":17777939,"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":["crypto","js","node","nodejs","pem"],"created_at":"2024-10-14T16:06:51.985Z","updated_at":"2024-12-01T00:07:14.518Z","avatar_url":"https://github.com/reklatsmasters.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pem-file\n\n[![Build Status](https://travis-ci.org/reklatsmasters/pem-file.svg?branch=master)](https://travis-ci.org/reklatsmasters/pem-file)\n[![npm](https://img.shields.io/npm/v/pem-file.svg)](https://npmjs.org/package/pem-file)\n[![node](https://img.shields.io/node/v/pem-file.svg)](https://npmjs.org/package/pem-file)\n[![license](https://img.shields.io/npm/l/pem-file.svg)](https://npmjs.org/package/pem-file)\n[![downloads](https://img.shields.io/npm/dm/pem-file.svg)](https://npmjs.org/package/pem-file)\n[![Coverage Status](https://coveralls.io/repos/github/reklatsmasters/pem-file/badge.svg?branch=master)](https://coveralls.io/github/reklatsmasters/pem-file?branch=master)\n\n\nPEM file format encoder/decoder.\n\n## Usage\n\n```js\nconst fs = require('fs')\nconst pem = require('pem-file')\n\nconst file = fs.readFileSync('./pubkey.pem')\nconsole.log(pem.decode(file)) // \u003cBuffer 30 82 ...\u003e\n```\n\n```js\nconst pem = require('pem-file')\nconst source = Buffer.from('12345')\n\nconsole.log(pem.encode(source, 'DATA'))\n// Output:\n// -----BEGIN DATA-----\n// MTIzNDU=\n// -----END DATA-----\n```\n\n## API\n\n* `encode(source: Buffer, label: string): string`\n\nConvert data to PEM format.\n\n* `decode(pem: Buffer | String): Buffer`\n\nConvert PEM formatted data to raw buffer.\n\n## License\n\nMIT, 2018 (c) Dmitriy Tsvettsikh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freklatsmasters%2Fpem-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freklatsmasters%2Fpem-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freklatsmasters%2Fpem-file/lists"}