{"id":18285938,"url":"https://github.com/exodusmovement/seco-file","last_synced_at":"2025-04-05T08:30:34.765Z","repository":{"id":49432958,"uuid":"61751233","full_name":"ExodusMovement/seco-file","owner":"ExodusMovement","description":"Methods to read / write secure container blobs to a file.","archived":false,"fork":false,"pushed_at":"2024-01-30T16:34:22.000Z","size":40,"stargazers_count":8,"open_issues_count":0,"forks_count":5,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-04-14T13:10:04.297Z","etag":null,"topics":[],"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/ExodusMovement.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-22T21:01:06.000Z","updated_at":"2024-06-19T09:16:36.729Z","dependencies_parsed_at":"2024-06-19T09:16:34.764Z","dependency_job_id":"203c3c72-be8a-4f26-90bb-894b5d56755d","html_url":"https://github.com/ExodusMovement/seco-file","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fseco-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fseco-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fseco-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fseco-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExodusMovement","download_url":"https://codeload.github.com/ExodusMovement/seco-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247311258,"owners_count":20918331,"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":[],"created_at":"2024-11-05T13:18:17.826Z","updated_at":"2025-04-05T08:30:34.445Z","avatar_url":"https://github.com/ExodusMovement.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"seco-file\n=========\n\nInstall\n-------\n\n    npm i --save seco-file\n\nUsage\n-----\n\n```js\n// ES6 modules:\nimport * as seco from 'seco-file'\n// OR\n// CommonJS:\nconst seco = require('seco-file')\n```\n\n### `write()`\n\n`write(file, data, options)`\n\n- `file` (String) Filename to write to\n- `data` (String | Buffer) Data to write to the file\n- `options` (Object)\n  - `header` (Object)\n    - `appName` (String) Name of your app\n    - `appVersion` (String) Version of your app\n  - `passphrase` (String | Buffer) Passphrase used to encrypt the data\n  - `metadata` (Object)\n  - `blobKey` (Buffer)\n  - `overwrite` (Boolean) When `true`, overwrites `file` if it already exists. Default is `false`.\n\n_Note:_ Must set either `passphrase` or `metadata` \u0026 `blobKey`.\n\nReturns a Promise. Promise resolves to an Object that contains `blobKey` and `metadata`.\n\n### `read()`\n\n`read(file, passphrase)`\n\n- `file` (String) File to read\n- `passphrase` (String | Buffer) Passphrase to decrypt the file.\n\nReturns a Promise, resolving to an object that contains:\n\n- `data` (Buffer) The file data\n- `header` (Object) The header for the secure-container\n- `blobKey` (Buffer)\n- `metadata` (Object)\n\nLicense\n-------\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fseco-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexodusmovement%2Fseco-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fseco-file/lists"}