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
dbc573ff
Kaydet (Commit)
dbc573ff
authored
Eki 07, 2012
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
re-add brg_endian.h to debug issue in big endian SPARC machine
üst
58f11831
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
150 additions
and
7 deletions
+150
-7
cleanup.py
Modules/_sha3/cleanup.py
+4
-4
KeccakF-1600-opt32.c
Modules/_sha3/keccak/KeccakF-1600-opt32.c
+1
-1
KeccakF-1600-opt64.c
Modules/_sha3/keccak/KeccakF-1600-opt64.c
+1
-1
brg_endian.h
Modules/_sha3/keccak/brg_endian.h
+142
-0
sha3module.c
Modules/_sha3/sha3module.c
+2
-1
No files found.
Modules/_sha3/cleanup.py
Dosyayı görüntüle @
dbc573ff
...
@@ -32,10 +32,10 @@ def cleanup(f):
...
@@ -32,10 +32,10 @@ def cleanup(f):
if
line
.
startswith
(
"typedef unsigned long long int"
):
if
line
.
startswith
(
"typedef unsigned long long int"
):
buf
.
append
(
"/*
%
s */
\n
"
%
line
.
strip
())
buf
.
append
(
"/*
%
s */
\n
"
%
line
.
strip
())
continue
continue
# remove #include "brg_endian.h"
#
#
remove #include "brg_endian.h"
if
"brg_endian.h"
in
line
:
#
if "brg_endian.h" in line:
buf
.
append
(
"/*
%
s */
\n
"
%
line
.
strip
())
#
buf.append("/* %s */\n" % line.strip())
continue
#
continue
# transform C++ comments into ANSI C comments
# transform C++ comments into ANSI C comments
line
=
CPP1
.
sub
(
r"/* \1 */"
,
line
)
line
=
CPP1
.
sub
(
r"/* \1 */"
,
line
)
line
=
CPP2
.
sub
(
r" /* \1 */"
,
line
)
line
=
CPP2
.
sub
(
r" /* \1 */"
,
line
)
...
...
Modules/_sha3/keccak/KeccakF-1600-opt32.c
Dosyayı görüntüle @
dbc573ff
...
@@ -12,7 +12,7 @@ http://creativecommons.org/publicdomain/zero/1.0/
...
@@ -12,7 +12,7 @@ http://creativecommons.org/publicdomain/zero/1.0/
*/
*/
#include <string.h>
#include <string.h>
/* #include "brg_endian.h" */
#include "brg_endian.h"
#include "KeccakF-1600-opt32-settings.h"
#include "KeccakF-1600-opt32-settings.h"
#include "KeccakF-1600-interface.h"
#include "KeccakF-1600-interface.h"
...
...
Modules/_sha3/keccak/KeccakF-1600-opt64.c
Dosyayı görüntüle @
dbc573ff
...
@@ -12,7 +12,7 @@ http://creativecommons.org/publicdomain/zero/1.0/
...
@@ -12,7 +12,7 @@ http://creativecommons.org/publicdomain/zero/1.0/
*/
*/
#include <string.h>
#include <string.h>
/* #include "brg_endian.h" */
#include "brg_endian.h"
#include "KeccakF-1600-opt64-settings.h"
#include "KeccakF-1600-opt64-settings.h"
#include "KeccakF-1600-interface.h"
#include "KeccakF-1600-interface.h"
...
...
Modules/_sha3/keccak/brg_endian.h
0 → 100755
Dosyayı görüntüle @
dbc573ff
/*
---------------------------------------------------------------------------
Copyright (c) 1998-2008, Brian Gladman, Worcester, UK. All rights reserved.
LICENSE TERMS
The redistribution and use of this software (with or without changes)
is allowed without the payment of fees or royalties provided that:
1. source code distributions include the above copyright notice, this
list of conditions and the following disclaimer;
2. binary distributions include the above copyright notice, this list
of conditions and the following disclaimer in their documentation;
3. the name of the copyright holder is not used to endorse products
built using this software without specific written permission.
DISCLAIMER
This software is provided 'as is' with no explicit or implied warranties
in respect of its properties, including, but not limited to, correctness
and/or fitness for purpose.
---------------------------------------------------------------------------
Issue Date: 20/12/2007
Changes for ARM 9/9/2010
*/
#ifndef _BRG_ENDIAN_H
#define _BRG_ENDIAN_H
#define IS_BIG_ENDIAN 4321
/* byte 0 is most significant (mc68k) */
#define IS_LITTLE_ENDIAN 1234
/* byte 0 is least significant (i386) */
#if 0
/* Include files where endian defines and byteswap functions may reside */
#if defined( __sun )
# include <sys/isa_defs.h>
#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ )
# include <sys/endian.h>
#elif
defined
(
BSD
)
&&
(
BSD
>=
199103
)
||
defined
(
__APPLE__
)
||
\
defined
(
__CYGWIN32__
)
||
defined
(
__DJGPP__
)
||
defined
(
__osf__
)
# include <machine/endian.h>
#elif defined( __linux__ ) || defined( __GNUC__ ) || defined( __GNU_LIBRARY__ )
# if !defined( __MINGW32__ ) && !defined( _AIX )
# include <endian.h>
# if !defined( __BEOS__ )
# include <byteswap.h>
# endif
# endif
#endif
#endif
/* Now attempt to set the define for platform byte order using any */
/* of the four forms SYMBOL, _SYMBOL, __SYMBOL & __SYMBOL__, which */
/* seem to encompass most endian symbol definitions */
#if defined( BIG_ENDIAN ) && defined( LITTLE_ENDIAN )
# if defined( BYTE_ORDER ) && BYTE_ORDER == BIG_ENDIAN
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
# elif defined( BYTE_ORDER ) && BYTE_ORDER == LITTLE_ENDIAN
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
# endif
#elif defined( BIG_ENDIAN )
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
#elif defined( LITTLE_ENDIAN )
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
#endif
#if defined( _BIG_ENDIAN ) && defined( _LITTLE_ENDIAN )
# if defined( _BYTE_ORDER ) && _BYTE_ORDER == _BIG_ENDIAN
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
# elif defined( _BYTE_ORDER ) && _BYTE_ORDER == _LITTLE_ENDIAN
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
# endif
#elif defined( _BIG_ENDIAN )
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
#elif defined( _LITTLE_ENDIAN )
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
#endif
#if defined( __BIG_ENDIAN ) && defined( __LITTLE_ENDIAN )
# if defined( __BYTE_ORDER ) && __BYTE_ORDER == __BIG_ENDIAN
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
# elif defined( __BYTE_ORDER ) && __BYTE_ORDER == __LITTLE_ENDIAN
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
# endif
#elif defined( __BIG_ENDIAN )
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
#elif defined( __LITTLE_ENDIAN )
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
#endif
#if defined( __BIG_ENDIAN__ ) && defined( __LITTLE_ENDIAN__ )
# if defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __BIG_ENDIAN__
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
# elif defined( __BYTE_ORDER__ ) && __BYTE_ORDER__ == __LITTLE_ENDIAN__
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
# endif
#elif defined( __BIG_ENDIAN__ )
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
#elif defined( __LITTLE_ENDIAN__ )
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
#endif
/* if the platform byte order could not be determined, then try to */
/* set this define using common machine defines */
#if !defined(PLATFORM_BYTE_ORDER)
#if defined( __alpha__ ) || defined( __alpha ) || defined( i386 ) || \
defined( __i386__ ) || defined( _M_I86 ) || defined( _M_IX86 ) || \
defined( __OS2__ ) || defined( sun386 ) || defined( __TURBOC__ ) || \
defined( vax ) || defined( vms ) || defined( VMS ) || \
defined( __VMS ) || defined( _M_X64 )
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
#elif defined( AMIGA ) || defined( applec ) || defined( __AS400__ ) || \
defined( _CRAY ) || defined( __hppa ) || defined( __hp9000 ) || \
defined( ibm370 ) || defined( mc68000 ) || defined( m68k ) || \
defined( __MRC__ ) || defined( __MVS__ ) || defined( __MWERKS__ ) || \
defined( sparc ) || defined( __sparc) || defined( SYMANTEC_C ) || \
defined( __VOS__ ) || defined( __TIGCC__ ) || defined( __TANDEM ) || \
defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX )
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
#elif defined(__arm__)
# ifdef __BIG_ENDIAN
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
# else
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
# endif
#elif 1
/* **** EDIT HERE IF NECESSARY **** */
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
#elif 0
/* **** EDIT HERE IF NECESSARY **** */
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
#else
# error Please edit lines 132 or 134 in brg_endian.h to set the platform byte order
#endif
#endif
#endif
Modules/_sha3/sha3module.c
Dosyayı görüntüle @
dbc573ff
...
@@ -116,10 +116,11 @@
...
@@ -116,10 +116,11 @@
#define UseInterleaveTables
#define UseInterleaveTables
#endif
#endif
/* replacement for brg_endian.h
*/
/* replacement for brg_endian.h
#define IS_BIG_ENDIAN BIG_ENDIAN
#define IS_BIG_ENDIAN BIG_ENDIAN
#define IS_LITTLE_ENDIAN LITTLE_ENDIAN
#define IS_LITTLE_ENDIAN LITTLE_ENDIAN
#define PLATFORM_BYTE_ORDER BYTE_ORDER
#define PLATFORM_BYTE_ORDER BYTE_ORDER
*/
/* inline all Keccak dependencies */
/* inline all Keccak dependencies */
#include "keccak/KeccakNISTInterface.h"
#include "keccak/KeccakNISTInterface.h"
...
...
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