Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
ebcf34e3
Commit
ebcf34e3
authored
Feb 09, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up crypter.
parent
874f02c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
crypter.php
laravel/crypter.php
+2
-3
No files found.
laravel/crypter.php
View file @
ebcf34e3
...
@@ -45,15 +45,14 @@ class Crypter {
...
@@ -45,15 +45,14 @@ class Crypter {
// To decrypt the value, we first need to extract the input vector and
// To decrypt the value, we first need to extract the input vector and
// the encrypted value. The input vector size varies across different
// the encrypted value. The input vector size varies across different
// encryption ciphers and modes, so we will get the correct size for
// encryption ciphers and modes, so we'll get the correct size.
// the cipher and mode being used by the class.
$iv
=
substr
(
$value
,
0
,
static
::
iv_size
());
$iv
=
substr
(
$value
,
0
,
static
::
iv_size
());
$value
=
substr
(
$value
,
static
::
iv_size
());
$value
=
substr
(
$value
,
static
::
iv_size
());
// Once we have the input vector and the value, we can give them both
// Once we have the input vector and the value, we can give them both
// to Mcrypt for decryption. The value is sometimes padded with \0,
// to Mcrypt for decryption. The value is sometimes padded with \0,
// so we will trim all of the padding characters
from the string
.
// so we will trim all of the padding characters.
$key
=
static
::
key
();
$key
=
static
::
key
();
return
rtrim
(
mcrypt_decrypt
(
static
::
$cipher
,
$key
,
$value
,
static
::
$mode
,
$iv
),
"
\0
"
);
return
rtrim
(
mcrypt_decrypt
(
static
::
$cipher
,
$key
,
$value
,
static
::
$mode
,
$iv
),
"
\0
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment