[Dbix-class] inflate_column help
Marc Mims
marc at questright.com
Wed Mar 26 23:06:05 GMT 2008
* xyon <xyon at indigorobot.com> [080326 15:00]:
> On Wed, 2008-03-26 at 14:37 -0700, Marc Mims wrote:
> > * xyon <xyon at indigorobot.com> [080326 14:10]:
> > > I am trying to wrap my head around using "inflate_column" to
> > > decrypt/encrypt AES Encrypted data from within a MySQL database, but
> > > have not found any examples on Google. Also, below is an attempt to
> > > figure out how to run raw SQL queries with DBIx::Class.
> >
> > You don't want inflate_column. See DBIx::Class::EncodedColumn.
> >
> > (xyon, sorry for the dup reply... I failed to do a list-reply the first
> > time)
> >
>
> Thank you for the pointer, it definitely looks like a smoother/cleaner
> approach.
>
> I've browsed through the documentation, and am not seeing anything
> referring to AES encryption, however. Is there a way to extend the
> encryption algorithms to use MySQL native AES?
Actually, I haven't dealt with that particular problem. Perhaps
Crypt::OpenSSL::AES or Crypt::Rijndael can be used as the digest_class
with appropriate encode_args. It may require creating a subclass??
The reason I warned you away from inflate_column is that it expects to
inflate from a string to an object and deflate from an object to a
string. It doesn't handle string to string transformations.
-Marc
More information about the DBIx-Class
mailing list