47ng / 47ng/prisma-field-encryption
Support for encrypting numbers
- Lingua principale
- TypeScript
- Stelle
- 306
- Fork
- 40
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hey folks,
I recently started using this for a hobby project and noticed that it is possible to encrypt Strings only.
```
Error: encryption enabled for field amount of unsupported type Float: only String fields can be encrypted.
```
Is there some inherent plugin/cryptography limitation to encrypting numbers, or was this just never a priority to implement?
If someone could give me a couple of hints around this I'd love to take a stab at implementing support for it.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
The error message indicates the limitation is in the plugin's field type handling. Start by examining the source code for encryption logic, likely in a middleware or transformer file, to see how String fields are currently encrypted. Look for type checks and encryption/decryption functions. The goal is to extend support to numeric types like Float, ensuring serialization to/from encrypted strings works correctly. Testing will involve creating a Prisma schema with an encrypted Float field and verifying encryption/decryption cycles.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- backend-api-design, databases
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 55/100