python3-pykeepass: fix on big endian

This commit is contained in:
q66 2021-02-11 02:24:37 +01:00
parent dd52acf653
commit e73157e72e
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From fcabf9640d0426d01411681d7d1b74db6f3292e0 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Thu, 11 Feb 2021 02:14:36 +0100
Subject: [PATCH] fix big endian support
---
pykeepass/kdbx_parsing/pytwofish.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git pykeepass/kdbx_parsing/pytwofish.py pykeepass/kdbx_parsing/pytwofish.py
index 7cea419..4749d72 100644
--- pykeepass/kdbx_parsing/pytwofish.py
+++ pykeepass/kdbx_parsing/pytwofish.py
@@ -140,8 +140,9 @@ import struct
import sys
WORD_BIGENDIAN = 0
-if sys.byteorder == 'big':
- WORD_BIGENDIAN = 1
+# this actually breaks the implementation
+#if sys.byteorder == 'big':
+# WORD_BIGENDIAN = 1
def rotr32(x, n):
return (x >> n) | ((x << (32 - n)) & 0xFFFFFFFF)
--
2.30.0

View File

@ -1,7 +1,7 @@
# Template file for 'python3-pykeepass'
pkgname=python3-pykeepass
version=3.2.1
revision=1
revision=2
wrksrc="pykeepass-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools"