@nest-boot/mikro-orm-crypt
Functions
EncryptedProperty()
function EncryptedProperty<T>(options?): PropertyDecorator;
Defined in: encrypted-property.decorator.ts:28
Decorator that marks a property as an encrypted field. The property value will be automatically encrypted before create and update operations.
Type Parameters
| Type Parameter |
|---|
T extends object |
Parameters
| Parameter | Type |
|---|---|
options? | Partial<PropertyOptions<T>> |
Returns
PropertyDecorator
Example
import { Entity } from '@mikro-orm/core';
import { EncryptedProperty } from '@nest-boot/mikro-orm-crypt';
@Entity()
export class User {
@EncryptedProperty({ type: t.string })
ssn!: string;
}