Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
0b49e02e
Kaydet (Commit)
0b49e02e
authored
Agu 03, 2004
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #977074: Move Encode/Decode to the top so gcc can inline them.
üst
65a7975f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
34 deletions
+33
-34
md5c.c
Modules/md5c.c
+33
-34
No files found.
Modules/md5c.c
Dosyayı görüntüle @
0b49e02e
...
...
@@ -46,8 +46,39 @@ documentation and/or software.
#define S44 21
static
void
MD5Transform
(
UINT4
[
4
],
unsigned
char
[
64
]);
static
void
Encode
(
unsigned
char
*
,
UINT4
*
,
unsigned
int
);
static
void
Decode
(
UINT4
*
,
unsigned
char
*
,
unsigned
int
);
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
a multiple of 4.
*/
static
void
Encode
(
unsigned
char
*
output
,
UINT4
*
input
,
unsigned
int
len
)
{
unsigned
int
i
,
j
;
for
(
i
=
0
,
j
=
0
;
j
<
len
;
i
++
,
j
+=
4
)
{
output
[
j
]
=
(
unsigned
char
)(
input
[
i
]
&
0xff
);
output
[
j
+
1
]
=
(
unsigned
char
)((
input
[
i
]
>>
8
)
&
0xff
);
output
[
j
+
2
]
=
(
unsigned
char
)((
input
[
i
]
>>
16
)
&
0xff
);
output
[
j
+
3
]
=
(
unsigned
char
)((
input
[
i
]
>>
24
)
&
0xff
);
}
}
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
a multiple of 4.
*/
static
void
Decode
(
UINT4
*
output
,
unsigned
char
*
input
,
unsigned
int
len
)
{
unsigned
int
i
,
j
;
for
(
i
=
0
,
j
=
0
;
j
<
len
;
i
++
,
j
+=
4
)
{
output
[
i
]
=
((
UINT4
)
input
[
j
])
|
(((
UINT4
)
input
[
j
+
1
])
<<
8
)
|
(((
UINT4
)
input
[
j
+
2
])
<<
16
)
|
(((
UINT4
)
input
[
j
+
3
])
<<
24
);
}
}
static
unsigned
char
PADDING
[
64
]
=
{
0x80
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
...
...
@@ -256,35 +287,3 @@ MD5Transform(UINT4 state[4], unsigned char block[64])
/* Zeroize sensitive information. */
memset
((
POINTER
)
x
,
0
,
sizeof
(
x
));
}
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
a multiple of 4.
*/
static
void
Encode
(
unsigned
char
*
output
,
UINT4
*
input
,
unsigned
int
len
)
{
unsigned
int
i
,
j
;
for
(
i
=
0
,
j
=
0
;
j
<
len
;
i
++
,
j
+=
4
)
{
output
[
j
]
=
(
unsigned
char
)(
input
[
i
]
&
0xff
);
output
[
j
+
1
]
=
(
unsigned
char
)((
input
[
i
]
>>
8
)
&
0xff
);
output
[
j
+
2
]
=
(
unsigned
char
)((
input
[
i
]
>>
16
)
&
0xff
);
output
[
j
+
3
]
=
(
unsigned
char
)((
input
[
i
]
>>
24
)
&
0xff
);
}
}
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
a multiple of 4.
*/
static
void
Decode
(
UINT4
*
output
,
unsigned
char
*
input
,
unsigned
int
len
)
{
unsigned
int
i
,
j
;
for
(
i
=
0
,
j
=
0
;
j
<
len
;
i
++
,
j
+=
4
)
{
output
[
i
]
=
((
UINT4
)
input
[
j
])
|
(((
UINT4
)
input
[
j
+
1
])
<<
8
)
|
(((
UINT4
)
input
[
j
+
2
])
<<
16
)
|
(((
UINT4
)
input
[
j
+
3
])
<<
24
);
}
}
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