From c61c67b66da213d6948965c8719be464e4162bd8 Mon Sep 17 00:00:00 2001
From: Chocobozzz <djidane14ff@hotmail.fr>
Date: Wed, 19 Mar 2014 21:43:01 +0100
Subject: [PATCH] Maj Readme

---
 README.md      | 4 ++--
 index.php      | 3 ++-
 js/sha1-min.js | 9 +++++++++
 3 files changed, 13 insertions(+), 3 deletions(-)
 create mode 100644 js/sha1-min.js

diff --git a/README.md b/README.md
index 671b687..bd76c4b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # OpenVPN Admin
 
 ## Résumé
-Administrer son OpenVPN via une interface web (visualisation des logs, modifications des utilisateurs pouvant se connecter...).
+Administrer son OpenVPN via une interface web (visualisation des logs, modifications des utilisateurs pouvant se connecter...) selon un VPN configuré pour fonctionner avec SQL (un article de blog va venir).
 
 ## Prérequis
 Serveur web, php et mysql.
@@ -13,4 +13,4 @@ Serveur web, php et mysql.
 
 ## Notes
 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.
\ No newline at end of file
+Utilisation des scripts de [pajhome](http://pajhome.org.uk/crypt/md5/index.html) pour l'algorithme sha1 en JavaScript.
diff --git a/index.php b/index.php
index 688ba2d..ff64f45 100644
--- a/index.php
+++ b/index.php
@@ -35,10 +35,11 @@
         <link rel="stylesheet" href="css/enhancementpager.css" type="text/css" />
         <link rel="stylesheet" href="css/index.css" type="text/css"/>-->
         
-        <link rel="stylesheet" href="css/min.css" type="text/css"/>
+        <link rel="stylesheet" href="css/min.css" type="text/css" />
     </head>
     <body>
         <?php
+        
             // Si pas connecté on affiche le formulaire
             if(!isset($_SESSION['admin_id'])){
                 if($connexion_erreur)
diff --git a/js/sha1-min.js b/js/sha1-min.js
new file mode 100644
index 0000000..cb55446
--- /dev/null
+++ b/js/sha1-min.js
@@ -0,0 +1,9 @@
+/*
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
+ * in FIPS 180-1
+ * Version 2.2 Copyright Paul Johnston 2000 - 2009.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for details.
+ */
+var hexcase=0;var b64pad="";function hex_sha1(a){return rstr2hex(rstr_sha1(str2rstr_utf8(a)))}function hex_hmac_sha1(a,b){return rstr2hex(rstr_hmac_sha1(str2rstr_utf8(a),str2rstr_utf8(b)))}function sha1_vm_test(){return hex_sha1("abc").toLowerCase()=="a9993e364706816aba3e25717850c26c9cd0d89d"}function rstr_sha1(a){return binb2rstr(binb_sha1(rstr2binb(a),a.length*8))}function rstr_hmac_sha1(c,f){var e=rstr2binb(c);if(e.length>16){e=binb_sha1(e,c.length*8)}var a=Array(16),d=Array(16);for(var b=0;b<16;b++){a[b]=e[b]^909522486;d[b]=e[b]^1549556828}var g=binb_sha1(a.concat(rstr2binb(f)),512+f.length*8);return binb2rstr(binb_sha1(d.concat(g),512+160))}function rstr2hex(c){try{hexcase}catch(g){hexcase=0}var f=hexcase?"0123456789ABCDEF":"0123456789abcdef";var b="";var a;for(var d=0;d<c.length;d++){a=c.charCodeAt(d);b+=f.charAt((a>>>4)&15)+f.charAt(a&15)}return b}function str2rstr_utf8(c){var b="";var d=-1;var a,e;while(++d<c.length){a=c.charCodeAt(d);e=d+1<c.length?c.charCodeAt(d+1):0;if(55296<=a&&a<=56319&&56320<=e&&e<=57343){a=65536+((a&1023)<<10)+(e&1023);d++}if(a<=127){b+=String.fromCharCode(a)}else{if(a<=2047){b+=String.fromCharCode(192|((a>>>6)&31),128|(a&63))}else{if(a<=65535){b+=String.fromCharCode(224|((a>>>12)&15),128|((a>>>6)&63),128|(a&63))}else{if(a<=2097151){b+=String.fromCharCode(240|((a>>>18)&7),128|((a>>>12)&63),128|((a>>>6)&63),128|(a&63))}}}}}return b}function rstr2binb(b){var a=Array(b.length>>2);for(var c=0;c<a.length;c++){a[c]=0}for(var c=0;c<b.length*8;c+=8){a[c>>5]|=(b.charCodeAt(c/8)&255)<<(24-c%32)}return a}function binb2rstr(b){var a="";for(var c=0;c<b.length*32;c+=8){a+=String.fromCharCode((b[c>>5]>>>(24-c%32))&255)}return a}function binb_sha1(v,o){v[o>>5]|=128<<(24-o%32);v[((o+64>>9)<<4)+15]=o;var y=Array(80);var u=1732584193;var s=-271733879;var r=-1732584194;var q=271733878;var p=-1009589776;for(var l=0;l<v.length;l+=16){var n=u;var m=s;var k=r;var h=q;var f=p;for(var g=0;g<80;g++){if(g<16){y[g]=v[l+g]}else{y[g]=bit_rol(y[g-3]^y[g-8]^y[g-14]^y[g-16],1)}var z=safe_add(safe_add(bit_rol(u,5),sha1_ft(g,s,r,q)),safe_add(safe_add(p,y[g]),sha1_kt(g)));p=q;q=r;r=bit_rol(s,30);s=u;u=z}u=safe_add(u,n);s=safe_add(s,m);r=safe_add(r,k);q=safe_add(q,h);p=safe_add(p,f)}return Array(u,s,r,q,p)}function sha1_ft(e,a,g,f){if(e<20){return(a&g)|((~a)&f)}if(e<40){return a^g^f}if(e<60){return(a&g)|(a&f)|(g&f)}return a^g^f}function sha1_kt(a){return(a<20)?1518500249:(a<40)?1859775393:(a<60)?-1894007588:-899497514}function safe_add(a,d){var c=(a&65535)+(d&65535);var b=(a>>16)+(d>>16)+(c>>16);return(b<<16)|(c&65535)}function bit_rol(a,b){return(a<<b)|(a>>>(32-b))};
\ No newline at end of file