eggcrypt 1.3.1__tar.gz → 1.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eggcrypt
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: A pretty secure (yet inneficient) encryption program. Has key(), hash(), encrypt() and decrypt().
5
5
  Author: Egglord
6
6
  License: MIT
@@ -56,7 +56,7 @@ def hash(inp):
56
56
  H[j]=(H[j]*0x100000001b3)&0xffffffffffffffff
57
57
  H[(j+1)%4]^=H[j]>>17
58
58
  key_str=''.join(f'{x:016x}' for x in H)
59
- tot=sum(map(ord,key_str))%10000
59
+ tot=sum((i+1)*ord(c) for i,c in enumerate(key_str))
60
60
  out=""
61
61
  for i in key_str:
62
62
  v=int(i,16)
@@ -69,7 +69,10 @@ def hash(inp):
69
69
  if len(out)%2:o+=chr(int(out[-1])*21)
70
70
  o=o.lstrip("0123456789")
71
71
  h=0
72
- for c in o:h=(h*31+ord(c))&((1<<256)-1)
72
+ for c in o:
73
+ h^=ord(c)
74
+ h=((h<<13)|(h >> 243))&((1<<256)-1)
75
+ h=(h*0x9e3779b97f4a7c15)&((1<<256)-1)
73
76
  chars="0123456789abcdefghijklmnopqrstuvwxyz"
74
77
  x=""
75
78
  while h:x=chars[h%36]+x;h//=36
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eggcrypt
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: A pretty secure (yet inneficient) encryption program. Has key(), hash(), encrypt() and decrypt().
5
5
  Author: Egglord
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "eggcrypt"
7
- version = "1.3.1"
7
+ version = "1.3.2"
8
8
  description = "A pretty secure (yet inneficient) encryption program. Has key(), hash(), encrypt() and decrypt()."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="egg",
5
- version="1.3.1",
5
+ version="1.3.2",
6
6
  packages=find_packages(),
7
7
  description="A pretty secure (yet inneficient) encryption program.",
8
8
  author="Egglord",
File without changes
File without changes
File without changes
File without changes