[sqlalchemy] Re: custom encryption for db columns/fields
That would be purely PostgreSQL. You can look on StackOverflow for answers. Newer versions of postgresql also have a crypto library that can be compiled into the server, which may help. https://www.postgresql.org/docs/current/pgcrypto.html -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/3d2b09be-0e7c-4e11-bbe9-baee61f354ea%40googlegroups.com.
[sqlalchemy] Re: custom encryption for db columns/fields
Regarding the extension of PostgreSQL, do you have an example for that? On Tuesday, 19 May 2020 22:13:28 UTC+2, Jonathan Vanasco wrote: > > > On Tuesday, 19 May 2020 19:24:48 UTC+2, Justvuur wrote: >>> >>> Is it possible to create a custom encryption/decryption algorithm that >>> can be used with sqlalchemy querying/filtering? >>> When querying and filtering, I would like the field to automatically >>> decrypt using the custom algorithm. >>> >> > You can create a SqlAlchemy CustomType that will encrypt/decrypt values to > the database.(https://docs.sqlalchemy.org/en/13/core/custom_types.html > ) > > There is an example of this when dealing with JSON: > > > https://docs.sqlalchemy.org/en/13/core/custom_types.html#marshal-json-strings > > > In order to query/filter the encrypted values, you will have to extend > PostgreSQL to perform the encryption, decryption, and querying of that data. > -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/095bef00-4a95-40bd-88e1-a7591394ce4f%40googlegroups.com.
[sqlalchemy] Re: custom encryption for db columns/fields
Thanks! This is great! Regarding the extension of PostgreSQL, do you have an example for that? On Tuesday, 19 May 2020 22:13:28 UTC+2, Jonathan Vanasco wrote: > > > On Tuesday, 19 May 2020 19:24:48 UTC+2, Justvuur wrote: >>> >>> Is it possible to create a custom encryption/decryption algorithm that >>> can be used with sqlalchemy querying/filtering? >>> When querying and filtering, I would like the field to automatically >>> decrypt using the custom algorithm. >>> >> > You can create a SqlAlchemy CustomType that will encrypt/decrypt values to > the database.(https://docs.sqlalchemy.org/en/13/core/custom_types.html > ) > > There is an example of this when dealing with JSON: > > > https://docs.sqlalchemy.org/en/13/core/custom_types.html#marshal-json-strings > > > In order to query/filter the encrypted values, you will have to extend > PostgreSQL to perform the encryption, decryption, and querying of that data. > -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/0cfad7aa-0265-4a5e-944c-93c2cc040053%40googlegroups.com.
[sqlalchemy] Re: custom encryption for db columns/fields
> On Tuesday, 19 May 2020 19:24:48 UTC+2, Justvuur wrote: >> >> Is it possible to create a custom encryption/decryption algorithm that >> can be used with sqlalchemy querying/filtering? >> When querying and filtering, I would like the field to automatically >> decrypt using the custom algorithm. >> > You can create a SqlAlchemy CustomType that will encrypt/decrypt values to the database.(https://docs.sqlalchemy.org/en/13/core/custom_types.html) There is an example of this when dealing with JSON: https://docs.sqlalchemy.org/en/13/core/custom_types.html#marshal-json-strings In order to query/filter the encrypted values, you will have to extend PostgreSQL to perform the encryption, decryption, and querying of that data. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/0dfba5fd-bdfd-4eee-9877-7650c0d8ee22%40googlegroups.com.
[sqlalchemy] Re: custom encryption for db columns/fields
Versions: SQLAlchemy = 1.2 PostgreSQL = 11.2 On Tuesday, 19 May 2020 19:24:48 UTC+2, Justvuur wrote: > > Is it possible to create a custom encryption/decryption algorithm that can > be used with sqlalchemy querying/filtering? > When querying and filtering, I would like the field to automatically > decrypt using the custom algorithm. > > -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/eda117e1-8a57-497c-8a15-a405af05f32e%40googlegroups.com.