Topic: Idear: More than one encryptions for mysql
I have a idear for more than one encryptions from mysql.
This should be an example, and it can be very cool for some imports like me, but i use ldap not mysql.
-- encryption table --
CREATE TABLE IF NOT EXISTS `encryption` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(20) NOT NULL,
`value` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
INSERT INTO `encryption` (`id`, `name`, `value`) VALUES
(1, 'Default (PLAIN MD5)', '{PLAIN-MD5}'),
(2, 'MYSQL Encrypt', '{CRYPT}'),
(3, 'Shadow Passwort', '{MD5}');
-- view table --
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_users` AS select concat(`users`.`user`,_latin1'@',`domains`.`name`) AS `email`,concat(`encryption`.`value`,`users`.`password`) AS `password` from ((`users` left join `domains` on((`users`.`domain_id` = `domains`.`id`))) left join `encryption` on((`users`.`encryption_id` = `encryption`.`id`)));
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.