eggcrypt 1.2.3__tar.gz → 1.2.4__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.2.3
3
+ Version: 1.2.4
4
4
  Summary: A pretty secure (yet inneficient) encryption program. Has key(), hash(), encrypt() and decrypt().
5
5
  Author: Egglord
6
6
  License: MIT
@@ -24,7 +24,7 @@ eggcrypt.decrypt("") # Returns a non-encrypted string.
24
24
 
25
25
  eggcrypt.key() # Returns a random key/seed.
26
26
 
27
- eggcrypt.ehash("") # Uses a custom method to hash a string. It is ehash and not hadh for 2 reasons: PyPI doesn't like hash and ehash is short for egghash (eggcrypt.egghash("") doesn't work).
27
+ eggcrypt.hash("") # Uses a custom method to hash a string.
28
28
 
29
29
  # !NB!
30
30
 
@@ -12,7 +12,7 @@ eggcrypt.decrypt("") # Returns a non-encrypted string.
12
12
 
13
13
  eggcrypt.key() # Returns a random key/seed.
14
14
 
15
- eggcrypt.ehash("") # Uses a custom method to hash a string. It is ehash and not hadh for 2 reasons: PyPI doesn't like hash and ehash is short for egghash (eggcrypt.egghash("") doesn't work).
15
+ eggcrypt.hash("") # Uses a custom method to hash a string.
16
16
 
17
17
  # !NB!
18
18
 
@@ -0,0 +1 @@
1
+ from .egg import encrypt, decrypt, key, hash
@@ -46,11 +46,11 @@ def key():
46
46
  a=int(a)
47
47
  seed=int(seed*a+(round(seed^a)))
48
48
  return seed
49
- def ehash(inp):
49
+ def hash(inp):
50
50
  inp=str(inp)
51
51
  tot=0
52
- for i in inp:
53
- tot+=ord(i)
52
+ for i,c in enumerate(inp):
53
+ tot+=(i+1)*ord(c)
54
54
  key=(len(inp)*tot)^(tot*256)
55
55
  out=""
56
56
  for i in str(key):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eggcrypt
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: A pretty secure (yet inneficient) encryption program. Has key(), hash(), encrypt() and decrypt().
5
5
  Author: Egglord
6
6
  License: MIT
@@ -24,7 +24,7 @@ eggcrypt.decrypt("") # Returns a non-encrypted string.
24
24
 
25
25
  eggcrypt.key() # Returns a random key/seed.
26
26
 
27
- eggcrypt.ehash("") # Uses a custom method to hash a string. It is ehash and not hadh for 2 reasons: PyPI doesn't like hash and ehash is short for egghash (eggcrypt.egghash("") doesn't work).
27
+ eggcrypt.hash("") # Uses a custom method to hash a string.
28
28
 
29
29
  # !NB!
30
30
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "eggcrypt"
7
- version = "1.2.3"
7
+ version = "1.2.4"
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.2.3",
5
+ version="1.2.4",
6
6
  packages=find_packages(),
7
7
  description="A pretty secure (yet inneficient) encryption program.",
8
8
  author="Egglord",
@@ -1 +0,0 @@
1
- from .egg import encrypt, decrypt, key, ehash
File without changes
File without changes