Phil wrote:
Ideal for me would be;
1/ Set an encryption key in the LLBLGen designer for the entire project. This key needs to be supplied to the entities to do a load, ideally this would be stored in the app.config.
2/ Set the fields which need to be encrypted in the designer when you edit the entities.
(after all don't want to encrypted all the data).
There's always a question in my mind as to how and where to store a key, as well as if this needs to be supplied for each call or as part of the overall constructor.
My question is always: encrypted data can't be used, so it has to be decrypted to be used. This thus means that the ONLY useful way is that code can plug in a key in the entity and AFTER doing that, the entity is usable as the property data gets decrypted.
Any other way is IMHO useless: either it has decrypted data in memory which thus can be retrieved through reflection, or it has encrypted data which then has to be read in encrypted form which also is pretty meaningless, as you can already do that: store the encrypted data in a blob field.
So IMHO the only useful way to encrypt/decrypt data in an entity is that the data is stored encrypted and when loaded from the db stays encrypted till the property is read and the decrypter kicks in, preferably indeed via a delegate. The other way around, a field gets set to a value, which is then encrypted through a delegate as well.
In the may/june update type converters are planned which allows you to specify your own assemblies which convert from one type to the other and which are used in the properties. I can imagine you can build type converters which in fact decrypt (i.e. convert 256byte varbinaries to string for example and vice versa)
Aside from encryption, where did the name LLBLGen come from?
Lower Level Business logic Layers Generator