{"id":28209847,"url":"https://github.com/armintamzarian/aenigma","last_synced_at":"2026-05-05T06:39:00.219Z","repository":{"id":57173909,"uuid":"98667204","full_name":"ArminTamzarian/aenigma","owner":"ArminTamzarian","description":"User-friendly AngularJS encryption module utilizing the Web Cryptography API and providing an extensible secure secret storage mechanism.","archived":false,"fork":false,"pushed_at":"2017-12-28T22:34:08.000Z","size":1456,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T17:09:00.389Z","etag":null,"topics":["angularjs","cryptography","localstorage","webcrypto"],"latest_commit_sha":null,"homepage":"https://armintamzarian.github.io/aenigma/","language":"TypeScript","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/ArminTamzarian.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":null,"security":null,"support":null}},"created_at":"2017-07-28T16:20:22.000Z","updated_at":"2017-12-28T21:00:43.000Z","dependencies_parsed_at":"2022-09-02T12:10:56.386Z","dependency_job_id":null,"html_url":"https://github.com/ArminTamzarian/aenigma","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/ArminTamzarian%2Faenigma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArminTamzarian%2Faenigma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArminTamzarian%2Faenigma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArminTamzarian%2Faenigma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArminTamzarian","download_url":"https://codeload.github.com/ArminTamzarian/aenigma/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArminTamzarian%2Faenigma/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259154213,"owners_count":22813546,"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":["angularjs","cryptography","localstorage","webcrypto"],"created_at":"2025-05-17T17:08:59.182Z","updated_at":"2026-05-05T06:39:00.106Z","avatar_url":"https://github.com/ArminTamzarian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aenigma\n\nUser-friendly [AngularJS](https://angularjs.org/) encryption module utilizing the [Web Cryptography API](https://www.w3.org/TR/WebCryptoAPI/) and providing an extensible secure secret storage mechanism.\n\n[![Build Status](https://travis-ci.org/ArminTamzarian/aenigma.svg?branch=master)](https://travis-ci.org/ArminTamzarian/aenigma)\n[![codecov](https://codecov.io/gh/ArminTamzarian/aenigma/branch/master/graph/badge.svg)](https://codecov.io/gh/ArminTamzarian/aenigma)\n[![npm version](https://badge.fury.io/js/aenigma.svg)](http://badge.fury.io/js/aenigma)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/ArminTamzarian/aenigma/master/LICENSE)\n\n## Getting Started\n\n### Installation\n\nInstall through npm:\n```\nnpm install --save aenigma\n```\n\nThen include in your apps module:\n\n```typescript\nimport { NgModule } from '@angular/core';\nimport { AenigmaModule } from 'aenigma';\n\n@NgModule({\n  imports: [\n    AenigmaModule.forRoot()\n  ]\n})\nexport class MyModule {}\n```\n\nFinally use in one of your apps components:\n```typescript\nimport { Component } from '@angular/core';\n\n@Component({\n  template: '\u003chello-world\u003e\u003c/hello-world\u003e'\n})\nexport class MyComponent {}\n```\n\nYou may also find it useful to view the [demo source](https://github.com/ArminTamzarian/aenigma/blob/master/demo/demo.view.ts).\n\n### Installation (without a module bundler)\n```html\n\u003cscript src=\"node_modules/aenigma/bundles/aenigma.umd.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    // everything is exported aenigma namespace\n\u003c/script\u003e\n```\n\n## Usage\n\n### Set up the desired `AenigmaStorageProvider` implementation\n\n```typescript\n@NgModule({\n  imports: [\n    AenigmaModule.forRoot()\n  ],\n  providers: [\n    AenigmaLocalStorageProvider\n  ]\n})\n```\n\n### Inject the `AenigmaStorageProvider` implementation into your component\n\n```typescript\nconstructor(private _encryptedStorageProvider: AenigmaLocalStorageProvider) { }\n```\n\n### In your component create your `Aenigma` object\n\n```typescript\nconstructor(private _encryptedStorageProvider: AenigmaLocalStorageProvider) {\n\n  Aenigma.create().subscribe(\n    (aenigma: Aenigma) =\u003e {\n      this._aenigma = aenigma;\n    },\n    error =\u003e {\n      console.error(error);\n    }\n  );\n}\n```\n\n### Use the Aenigma object to initialize the `AenigmaStorageService` object\n\n```typescript\nconstructor(private _encryptedStorageProvider: AenigmaLocalStorageProvider) {\n\n  Aenigma.create().subscribe(\n    (aenigma: Aenigma) =\u003e {\n      this._aenigma = aenigma;\n      this._encryptedStorage = new AenigmaStorageService(\n        this._aenigma,\n        this._encryptedStorageProvider\n      );\n    },\n    error =\u003e {\n      console.error(error);\n    }\n  );\n}\n```\n\n### Use the `Aenigma` object to encrypt/decrypt data\n```typescript\nthis._aenigma\n  .encrypt(plaintext)\n  .subscribe((encrypted: EncryptedValue) =\u003e {\n    console.log(encrypted.stringify());\n  });\n```\n\n```typescript\nthis._aenigma\n  .decrypt(EncryptedValue.parse(cipher))\n  .subscribe((decrypted: string) =\u003e {\n    this._plaintext = decrypted;\n  });\n```\n\n### Use the `AenigmaStorageService` implementation to store/retrieve encrypted data\n\n```typescript\nthis._encryptedStorage\n  .store('supersecret', 'secret_id')\n  .subscribe((encrypted: EncryptedValue) =\u003e {\n    console.log(encrypted.stringify());\n  });\n```\n\n```typescript\nthis._encryptedStorage\n  .retrieve('secret_id')\n  .subscribe((plaintext: string) =\u003e {\n    console.log(plaintext);\n  });\n```\n\n## Development\n\n### Prepare your environment\n\nInstall [Node.js](http://nodejs.org/) and NPM\n\nInstall local dev dependencies: `npm install` while current directory is this repo\n\n### Development server\n\nRun `npm start` to start a development server on port 8000 with auto reload + tests.\n\n### Testing\n\nRun `npm test` to run tests once or `npm run test:watch` to continually run tests.\n\n### Documentation\n\nLibrary and API documentation is available at https://armintamzarian.github.io/aenigma/\n## Release Notes\n\n### 0.1.0\n\n* Initial Release\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2017 Armin Tamzarian\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmintamzarian%2Faenigma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmintamzarian%2Faenigma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmintamzarian%2Faenigma/lists"}