Password Encryption Define password encryption method (Added in v 3.6)

You can define the encryption method to be used for password type fields before data insert or select. Previously you need to add callback function for this feature but now you can achieve same using this function also. Supported methods are base64_encode, md5 and sha1 with no extra parameters. If you need other way to encrypt, you can use the callback function.

  
                                $pdocrud = new PDOCrud();
                                $pdocrud->formFields(array("user_name","password"));
                                 /**
                                * Sets the type of field
                                * @param   string  $fieldName                             field name for types needs to be set
                                * @param   string  $type                                  Field type 
                                * @param   string  $parameters                            Field parameters
                                * return   object                                         Object of class
                                */
                                $pdocrud->fieldTypes("password", "password", array("encryption"=>"md5"));
                                echo $pdocrud->dbTable("users")->render("insertform");
                            

password encryption using PDOCrud