Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Linshizhi
ffmpeg.wasm-core
Commits
9e52a406
Commit
9e52a406
authored
Jul 03, 2011
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
des: allow unaligned input and output buffers
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
d04d9f24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
des.c
libavutil/des.c
+4
-4
No files found.
libavutil/des.c
View file @
9e52a406
...
...
@@ -299,10 +299,10 @@ int av_des_init(AVDES *d, const uint8_t *key, int key_bits, int decrypt) {
}
void
av_des_crypt
(
AVDES
*
d
,
uint8_t
*
dst
,
const
uint8_t
*
src
,
int
count
,
uint8_t
*
iv
,
int
decrypt
)
{
uint64_t
iv_val
=
iv
?
av_be2ne64
(
*
(
uint64_t
*
)
iv
)
:
0
;
uint64_t
iv_val
=
iv
?
AV_RB64
(
iv
)
:
0
;
while
(
count
--
>
0
)
{
uint64_t
dst_val
;
uint64_t
src_val
=
src
?
av_be2ne64
(
*
(
const
uint64_t
*
)
src
)
:
0
;
uint64_t
src_val
=
src
?
AV_RB64
(
src
)
:
0
;
if
(
decrypt
)
{
uint64_t
tmp
=
src_val
;
if
(
d
->
triple_des
)
{
...
...
@@ -319,12 +319,12 @@ void av_des_crypt(AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t
}
iv_val
=
iv
?
dst_val
:
0
;
}
*
(
uint64_t
*
)
dst
=
av_be2ne64
(
dst_val
);
AV_WB64
(
dst
,
dst_val
);
src
+=
8
;
dst
+=
8
;
}
if
(
iv
)
*
(
uint64_t
*
)
iv
=
av_be2ne64
(
iv_val
);
AV_WB64
(
iv
,
iv_val
);
}
#ifdef TEST
...
...
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