All code must follow:
- Clean Code by Uncle Bob.
- DRY, KISS and SOLID.
- Continuous refactor. If you edit a method clean it: Boy scout rule.
| <?php | |
| /** | |
| * simple method to encrypt or decrypt a plain text string | |
| * initialization vector(IV) has to be the same when encrypting and decrypting | |
| * | |
| * @param string $action: can be 'encrypt' or 'decrypt' | |
| * @param string $string: string to encrypt or decrypt | |
| * | |
| * @return string | |
| */ |
Update: There is a more secure version available. Details
<?php
$plaintext = 'My secret message 1234';| <div class="modal-header"> | |
| <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
| <h4 class="modal-title">Titulo</h4> | |
| </div> | |
| <div class="modal-body"> | |
| Contenido | |
| </div> | |
| <div class="modal-footer"> | |
| <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button> | |
| <button type="submit" class="btn btn-primary">Actualizar</button> |