Cryptage des mdp avec javascript
This commit is contained in:
parent
6fd441349f
commit
b1dbb1c287
@ -12,4 +12,5 @@ Serveur web, php et mysql.
|
||||
* Modifier le fichier connexion_bdd.php.example et le renommer en connexion_bdd.php
|
||||
|
||||
## Notes
|
||||
Utilisation du projet [SlickGrid](https://github.com/mleibman/SlickGrid) ainsi que de [SlickGridEnhancementPager](https://github.com/kingleema/SlickGridEnhancementPager) pour la pagination, merci à eux :).
|
||||
Utilisation du projet [SlickGrid](https://github.com/mleibman/SlickGrid) ainsi que de [SlickGridEnhancementPager](https://github.com/kingleema/SlickGridEnhancementPager) pour la pagination.
|
||||
Utilisation des scripts de [pajhome](http://pajhome.org.uk/crypt/md5/index.html) pour l'algorithme sha1 en JavaScript.
|
@ -103,6 +103,8 @@
|
||||
<script type="text/javascript" src="js/jquery.dropkick-1.0.0.js" charset="utf-8"></script>
|
||||
<script src="js/slick.enhancementpager.js"></script>
|
||||
|
||||
|
||||
<script src="js/sha1-min.js"></script>
|
||||
<script src="js/index.js"></script>
|
||||
|
||||
<?php
|
||||
|
@ -118,6 +118,14 @@ $(function () {
|
||||
url: "include/ajax.php",
|
||||
dataType: "json",
|
||||
data: item,
|
||||
success: function () {
|
||||
// Transformation en sha1 du mdp
|
||||
if(args.cell == 1) {
|
||||
grid.invalidateRow(args.row);
|
||||
data[args.row][grid.getColumns()[args.cell].field] = hex_sha1(data[args.row][grid.getColumns()[args.cell].field]);
|
||||
grid.render();
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert("Erreur dans la modification des données...");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user