void-packages/srcpkgs/python3-pykeepass/patches/be.patch

29 lines
785 B
Diff

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
--- a/pykeepass/kdbx_parsing/pytwofish.py
+++ b/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