Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VMS-z
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christoph Zysik
VMS-z
Commits
5a85b925
Commit
5a85b925
authored
6 years ago
by
Christoph Zysik
Browse files
Options
Downloads
Patches
Plain Diff
decludder datenbank.inc.php
parent
0d33c7a0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/datenbank.inc.php
+2
-8
2 additions, 8 deletions
lib/datenbank.inc.php
lib/functions.lib.php
+2
-4
2 additions, 4 deletions
lib/functions.lib.php
with
4 additions
and
12 deletions
lib/datenbank.inc.php
+
2
−
8
View file @
5a85b925
<?php
require_once
(
__DIR__
.
'/db_config.php'
);
//Passwort zusatz
$pw_zusatz
=
'fg65en'
;
// Verschlüsselungspasswort
$ver_schluessel
=
'libh5476H6G4v0TB'
;
require_once
(
__DIR__
.
'/db_config.php'
);
//Datenbankverbindung herstellen
$sql_open
=
@
mysqli_connect
(
DB_HOST
,
DB_USER
,
DB_PASS
,
DB_BASE
)
or
die
(
'Verbindung zum Mysql Server fehlgeschlagen! <br>Tipp: <a href="http://www.vms-tutorial.de/wiki//Lib/Functions">http://www.vms-tutorial.de/wiki//Lib/Functions</a>'
);
...
...
@@ -85,8 +80,7 @@ function db_fetch($result)
}
function
pw_erstellen
(
$pw
){
global
$pw_zusatz
;
$pw_er
=
hash
(
"sha256"
,
$pw
.
$pw_zusatz
);
$pw_er
=
hash
(
"sha256"
,
$pw
.
PW_ZUSATZ
);
return
$pw_er
;
}
...
...
This diff is collapsed.
Click to expand it.
lib/functions.lib.php
+
2
−
4
View file @
5a85b925
...
...
@@ -279,18 +279,16 @@ function geoIP($ip){
}
function
versch
(
$text
){
global
$ver_schluessel
;
$iv_size
=
mcrypt_get_iv_size
(
MCRYPT_RIJNDAEL_256
,
MCRYPT_MODE_ECB
);
$iv
=
mcrypt_create_iv
(
$iv_size
,
MCRYPT_RAND
);
$crypted
=
mcrypt_encrypt
(
MCRYPT_RIJNDAEL_256
,
$ver_schluessel
,
$text
,
MCRYPT_MODE_ECB
,
$iv
);
$crypted
=
mcrypt_encrypt
(
MCRYPT_RIJNDAEL_256
,
VER_SCHLUESSEL
,
$text
,
MCRYPT_MODE_ECB
,
$iv
);
return
$crypted
;
}
function
entsch
(
$text
){
global
$ver_schluessel
;
$iv_size
=
mcrypt_get_iv_size
(
MCRYPT_RIJNDAEL_256
,
MCRYPT_MODE_ECB
);
$iv
=
mcrypt_create_iv
(
$iv_size
,
MCRYPT_RAND
);
$encrypted
=
mcrypt_decrypt
(
MCRYPT_RIJNDAEL_256
,
$ver_schluessel
,
$text
,
MCRYPT_MODE_ECB
,
$iv
);
$encrypted
=
mcrypt_decrypt
(
MCRYPT_RIJNDAEL_256
,
VER_SCHLUESSEL
,
$text
,
MCRYPT_MODE_ECB
,
$iv
);
return
$encrypted
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment