p115cipher 0.0.2__tar.gz → 0.0.2.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.1
2
2
  Name: p115cipher
3
- Version: 0.0.2
3
+ Version: 0.0.2.2
4
4
  Summary: 115 cipher module.
5
5
  Home-page: https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/p115cipher
6
6
  License: MIT
@@ -32,16 +32,16 @@ Description-Content-Type: text/markdown
32
32
 
33
33
  ## Installation
34
34
 
35
- You can install via [pypi](https://pypi.org/project/cipher115/)
35
+ You can install via [pypi](https://pypi.org/project/p115cipher/)
36
36
 
37
37
  ```console
38
- pip install -U cipher115
38
+ pip install -U p115cipher
39
39
  ```
40
40
 
41
41
  ## Usage
42
42
 
43
43
  ```python
44
- from cipher115.fast import *
45
- from cipher115.normal import *
44
+ from p115cipher.fast import *
45
+ from p115cipher.normal import *
46
46
  ```
47
47
 
@@ -36,7 +36,7 @@ def rsa_decode(cipher_data: Buffer, /) -> bytearray:
36
36
  cipher_data = memoryview(b64decode(cipher_data))
37
37
  data = bytearray()
38
38
  for l, r, _ in acc_step(0, len(cipher_data), 128):
39
- p = pow(from_bytes(cipher_data[l:r]), *RSA_PUBKEY_PAIR)
39
+ p = pow(from_bytes(cipher_data[l:r]), RSA_PUBKEY_PAIR[1], RSA_PUBKEY_PAIR[0])
40
40
  b = to_bytes(p, (p.bit_length() + 0b111) >> 3)
41
41
  data += memoryview(b)[b.index(0)+1:]
42
42
  m = memoryview(data)
@@ -36,7 +36,7 @@ class P115RSACipher:
36
36
  text = bytearray()
37
37
  for l, r in pairwise(range(0, len(cipher_text) + 128, 128)):
38
38
  n = from_bytes(cipher_text[l:r])
39
- m = pow(n, *RSA_PUBKEY_PAIR)
39
+ m = pow(n, RSA_PUBKEY_PAIR[1], RSA_PUBKEY_PAIR[0])
40
40
  b = to_bytes(m, (m.bit_length() + 0b111) >> 3)
41
41
  text += b[b.index(0)+1:]
42
42
  rand_key = text[0:16]
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "p115cipher"
3
- version = "0.0.2"
3
+ version = "0.0.2.2"
4
4
  description = "115 cipher module."
5
5
  authors = ["ChenyangGao <wosiwujm@gmail.com>"]
6
6
  license = "MIT"
@@ -0,0 +1,16 @@
1
+ # 115 cipher module
2
+
3
+ ## Installation
4
+
5
+ You can install via [pypi](https://pypi.org/project/p115cipher/)
6
+
7
+ ```console
8
+ pip install -U p115cipher
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from p115cipher.fast import *
15
+ from p115cipher.normal import *
16
+ ```
@@ -1,16 +0,0 @@
1
- # 115 cipher module
2
-
3
- ## Installation
4
-
5
- You can install via [pypi](https://pypi.org/project/cipher115/)
6
-
7
- ```console
8
- pip install -U cipher115
9
- ```
10
-
11
- ## Usage
12
-
13
- ```python
14
- from cipher115.fast import *
15
- from cipher115.normal import *
16
- ```
File without changes