Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
e9f0b300
Commit
e9f0b300
authored
10 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #12609 from owncloud/remove-53-fixme
Remove workaround for 5.3
parents
884eb141
ee1f8b02
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/security/crypto.php
+2
-18
2 additions, 18 deletions
lib/private/security/crypto.php
with
2 additions
and
18 deletions
lib/private/security/crypto.php
+
2
−
18
View file @
e9f0b300
...
...
@@ -42,22 +42,6 @@ class Crypto implements ICrypto {
$this
->
random
=
$random
;
}
/**
* Custom implementation of hex2bin since the function is only available starting
* with PHP 5.4
*
* @TODO Remove this once 5.3 support for ownCloud is dropped
* @param $message
* @return string
*/
protected
static
function
hexToBin
(
$message
)
{
if
(
function_exists
(
'hex2bin'
))
{
return
hex2bin
(
$message
);
}
return
pack
(
"H*"
,
$message
);
}
/**
* @param string $message The message to authenticate
* @param string $password Password to use (defaults to `secret` in config.php)
...
...
@@ -115,9 +99,9 @@ class Crypto implements ICrypto {
throw
new
\Exception
(
'Authenticated ciphertext could not be decoded.'
);
}
$ciphertext
=
self
::
hexToB
in
(
$parts
[
0
]);
$ciphertext
=
hex2b
in
(
$parts
[
0
]);
$iv
=
$parts
[
1
];
$hmac
=
self
::
hexToB
in
(
$parts
[
2
]);
$hmac
=
hex2b
in
(
$parts
[
2
]);
$this
->
cipher
->
setIV
(
$iv
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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