{"id":21701026,"url":"https://github.com/ed-itsolutions/typeorm-encrypted-column","last_synced_at":"2025-07-17T15:37:25.137Z","repository":{"id":46940730,"uuid":"150614091","full_name":"Ed-ITSolutions/typeorm-encrypted-column","owner":"Ed-ITSolutions","description":"Provides a decorator for encrypted columns in TypeORM.","archived":false,"fork":false,"pushed_at":"2023-01-04T21:37:25.000Z","size":896,"stargazers_count":5,"open_issues_count":14,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-03T20:06:11.448Z","etag":null,"topics":["decorators","encrypted-columns","encryption","typeorm"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ed-ITSolutions.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-27T16:08:48.000Z","updated_at":"2025-01-01T21:22:32.000Z","dependencies_parsed_at":"2023-02-02T20:46:11.317Z","dependency_job_id":null,"html_url":"https://github.com/Ed-ITSolutions/typeorm-encrypted-column","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ed-ITSolutions/typeorm-encrypted-column","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ed-ITSolutions%2Ftypeorm-encrypted-column","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ed-ITSolutions%2Ftypeorm-encrypted-column/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ed-ITSolutions%2Ftypeorm-encrypted-column/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ed-ITSolutions%2Ftypeorm-encrypted-column/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ed-ITSolutions","download_url":"https://codeload.github.com/Ed-ITSolutions/typeorm-encrypted-column/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ed-ITSolutions%2Ftypeorm-encrypted-column/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265623350,"owners_count":23800145,"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":["decorators","encrypted-columns","encryption","typeorm"],"created_at":"2024-11-25T20:17:39.912Z","updated_at":"2025-07-17T15:37:25.115Z","avatar_url":"https://github.com/Ed-ITSolutions.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typeorm Encrypted Column\n\n[![Build Status](https://travis-ci.org/Ed-ITSolutions/typeorm-encrypted-column.svg?branch=master)](https://travis-ci.org/Ed-ITSolutions/typeorm-encrypted-column) [![Coverage Status](https://coveralls.io/repos/github/Ed-ITSolutions/typeorm-encrypted-column/badge.svg?branch=master)](https://coveralls.io/github/Ed-ITSolutions/typeorm-encrypted-column?branch=master)\n\nTypeorm Encrypted Column is a replacement for [typeorm-encrypted](https://github.com/generalpiston/typeorm-encrypted).\n\n## Differences\n\nTypeorm Encrypted Column works slightly differently.\n\nTypeorm Encrypted Column uses a decorator instead of retyping the options object passed to column. Using this decorator it validates the key and algorithm provided throwing an error if they are not valid. This moves config errors to startup not the first time the encrypted column is accessed.\n\n## Usage\n\n```ts\nimport {Entity, PrimaryGeneratedColumn, Column, createConnection} from 'typeorm'\nimport {Subscriber as EncryptedColumnSubscriber, EncryptedColumn} from 'typeorm-encrypted-column'\n\n@Entity()\nclass ProtectedData{\n  @PrimaryGeneratedColumn()\n  id: number\n\n  @Column()\n  name: string\n\n  @EncryptedColumn({\n    encrypt: {\n      key: 'd85117047fd06d3afa79b6e44ee3a52eb426fc24c3a2e3667732e8da0342b4da',\n      algorithm: 'aes-256-cbc',\n      ivLength: 16,\n      looseMatching: false // If true existance of the column will not be checked.\n    }\n  })\n}\n\nlet connection = createConnection({\n  ...\n  entities: [ProtectedData],\n  subscribers: [EncryptedColumnSubscriber]\n})\n```\n\n## Contributing\n\nPull requests and issues are welcome on this repository.\n\nTo build locally pull a copy of the repository and run npm install to get the dependecies.\n\nTesting is done with `npm test` which will test the code.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fed-itsolutions%2Ftypeorm-encrypted-column","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fed-itsolutions%2Ftypeorm-encrypted-column","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fed-itsolutions%2Ftypeorm-encrypted-column/lists"}