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
c71ec8ae
Kaydet (Commit)
c71ec8ae
authored
Eyl 08, 2016
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sha3: let's keep it simple and always allocate enough extra space for uint64_t[20].
üst
c49a516a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
sha3module.c
Modules/_sha3/sha3module.c
+2
-3
No files found.
Modules/_sha3/sha3module.c
Dosyayı görüntüle @
c71ec8ae
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
#endif
#endif
#define SHA3_MAX_DIGESTSIZE 64
/* 64 Bytes (512 Bits) for 224 to 512 */
#define SHA3_MAX_DIGESTSIZE 64
/* 64 Bytes (512 Bits) for 224 to 512 */
#define SHA3_LANESIZE
96
/* ExtractLane needs an extra 96 bytes
*/
#define SHA3_LANESIZE
(20 * 8)
/* ExtractLane needs max uint64_t[20] extra.
*/
#define SHA3_state Keccak_HashInstance
#define SHA3_state Keccak_HashInstance
#define SHA3_init Keccak_HashInitialize
#define SHA3_init Keccak_HashInitialize
#define SHA3_process Keccak_HashUpdate
#define SHA3_process Keccak_HashUpdate
...
@@ -605,8 +605,7 @@ _SHAKE_digest(SHA3object *self, unsigned long digestlen, int hex)
...
@@ -605,8 +605,7 @@ _SHAKE_digest(SHA3object *self, unsigned long digestlen, int hex)
/* ExtractLane needs at least SHA3_MAX_DIGESTSIZE + SHA3_LANESIZE and
/* ExtractLane needs at least SHA3_MAX_DIGESTSIZE + SHA3_LANESIZE and
* SHA3_LANESIZE extra space.
* SHA3_LANESIZE extra space.
*/
*/
digest
=
(
unsigned
char
*
)
PyMem_Malloc
(
SHA3_LANESIZE
+
digest
=
(
unsigned
char
*
)
PyMem_Malloc
(
digestlen
+
SHA3_LANESIZE
);
((
digestlen
>
SHA3_MAX_DIGESTSIZE
)
?
digestlen
:
SHA3_MAX_DIGESTSIZE
));
if
(
digest
==
NULL
)
{
if
(
digest
==
NULL
)
{
return
PyErr_NoMemory
();
return
PyErr_NoMemory
();
}
}
...
...
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