{"id":19046373,"url":"https://github.com/wallix/datapeps-sdk-js","last_synced_at":"2025-10-29T00:35:31.856Z","repository":{"id":137467966,"uuid":"124263968","full_name":"wallix/datapeps-sdk-js","owner":"wallix","description":"DataPeps SDK in TypeScript/JavaScript","archived":false,"fork":false,"pushed_at":"2019-09-09T12:49:50.000Z","size":2982,"stargazers_count":26,"open_issues_count":0,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-12T11:55:57.318Z","etag":null,"topics":["datapeps"],"latest_commit_sha":null,"homepage":"https://datapeps.com/docs/sdk/js/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wallix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-03-07T16:31:56.000Z","updated_at":"2024-03-27T19:44:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0985f7d-a440-48dd-973d-626b363b30c8","html_url":"https://github.com/wallix/datapeps-sdk-js","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallix%2Fdatapeps-sdk-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallix%2Fdatapeps-sdk-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallix%2Fdatapeps-sdk-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallix%2Fdatapeps-sdk-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wallix","download_url":"https://codeload.github.com/wallix/datapeps-sdk-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250536230,"owners_count":21446697,"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":["datapeps"],"created_at":"2024-11-08T22:54:33.168Z","updated_at":"2025-10-29T00:35:26.810Z","avatar_url":"https://github.com/wallix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DataPeps SDK\n\nThis repository contains the source for the DataPeps SDK for JavaScript (written in TypeScript), released under the Apache License.\n\n[DataPeps](https://datapeps.com) is an [End-to-End Encryption](https://en.wikipedia.org/wiki/End-to-end_encryption) platform. By integrating this SDK in your application, you can encrypt resources on clients (web, mobile, ...) to store and share data securely. For you, as a developer, one of the main benefits is that the cryptography implementation is foolproof and you don't need any knowledge of cryptography.\n\n## Getting started\n\nThe simplest way to get started is to add DataPeps SDK, using your favourite package manager.\n\nWith `npm`, go to your project directory and run:\n\n```bash\nnpm install datapeps-sdk --save\n```\n\nIf you prefer `yarn`, go to your project directory and run:\n\n```bash\nyarn add datapeps-sdk\n```\n\nOnce installed, just add the following line to your code to import the DataPeps SDK:\n\n```typescript\nimport * as DataPeps from \"datapeps-sdk\";\n```\n\nIf you plan to use DataPeps with Node.js (for testing with [Mocha](https://mochajs.org/) for instance), please read more about dependencies [in the wiki](https://github.com/wallix/datapeps-sdk-js/wiki/Setting-up#using-the-sdk-with-nodejs).\n\n## Hello, DataPeps!\n\nSay there are two friends, Alice and Bob. Alice wants to send a picture to Bob; however, Alice is quite rather concerned about data security (good for her!), and she wants to ensure, that only Bob can eventually read the picture. DataPeps to the rescue!\n\nWith DataPeps, Alice encrypts the message like this:\n\n```javascript\nasync function aliceSend() {\n  let aliceSession = await DataPeps.Session.login(aliceLogin, alicePassword);\n  let resource = await aliceSession.Resource.create(\"text\", \"\", [bobLogin]);\n  let messageToBob = \"Hello, Bob!\";\n  let encryptedMessage = resource.encrypt(\n    new TextEncoder().encode(messageToBob)\n  );\n  console.log('Alice sent a message: \"' + messageToBob + '\"');\n  return [resource.id, encryptedMessage];\n}\n```\n\nand Bob decrypts the message like this:\n\n```javascript\nasync function bobReceive(resourceId, encryptedMessage) {\n  let bobSession = await DataPeps.Session.login(bobLogin, bobPassword);\n  let resource = await bobSession.Resource.get(resourceId);\n  let decryptedMessage = resource.decrypt(encryptedMessage);\n  let messageToBob = new TextDecoder().decode(decryptedMessage);\n  console.log('Bob received message: \"' + messageToBob + '\"');\n}\n```\n\nIf you want a detailed explanation of the code above, look it up [in the wiki](https://github.com/wallix/datapeps-sdk-js/wiki/Setting-up#hello-datapeps).\n\nWant to try asap? Here is a [complete Gist](https://gist.github.com/hbi-wallix/2229fec260f8670de5657628ef28e522).\n\n## Learn more\n\nDataPeps is written by the Innovation Department at [WALLIX](https://wallix.com).\n\n- [Website](https://datapeps.com)\n- [Twitter](https://twitter.com/DataPeps_WALLIX)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallix%2Fdatapeps-sdk-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwallix%2Fdatapeps-sdk-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallix%2Fdatapeps-sdk-js/lists"}