reykit 1.2.3__py3-none-any.whl → 1.2.4__py3-none-any.whl

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.
reykit/rdata.py CHANGED
@@ -619,8 +619,8 @@ def hash_bcrypt(password: str | bytes) -> bytes:
619
619
  """
620
620
 
621
621
  # Parameter.
622
- if type(password) != bytes:
623
- password = bytes(password)
622
+ if type(password) == str:
623
+ password = bytes(password, encoding='utf-8')
624
624
 
625
625
  # Hash.
626
626
  salt = bcrypt_gensalt()
@@ -644,10 +644,10 @@ def is_hash_bcrypt(password: str | bytes, password_hash: str | bytes) -> bool:
644
644
  """
645
645
 
646
646
  # Parameter.
647
- if type(password) != bytes:
648
- password = bytes(password)
649
- if type(password_hash) != bytes:
650
- password_hash = bytes(password_hash)
647
+ if type(password) == str:
648
+ password = bytes(password, encoding='utf-8')
649
+ if type(password_hash) == str:
650
+ password_hash = bytes(password_hash, encoding='utf-8')
651
651
 
652
652
  # Judge.
653
653
  result = bcrypt_checkpw(password, password_hash)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reykit
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: Kit method set.
5
5
  Project-URL: homepage, https://github.com/reyxbo/reykit/
6
6
  Author-email: Rey <reyxbo@163.com>
@@ -1,7 +1,7 @@
1
1
  reykit/__init__.py,sha256=Garu_XWuCXSp2a8rXviXcndlDi03vtwx9IDgIYycTw0,748
2
2
  reykit/rall.py,sha256=Oljb0rwJyCrC6LhGLxpPizdB6MhxoZ9DOOnWM1sQC4o,598
3
3
  reykit/rbase.py,sha256=snRdHOMTdsaWFYDQ5sTIcdJRybNcMarlz59EErbrepA,20897
4
- reykit/rdata.py,sha256=Z3_ZwWcibaFes_IRoRt_Z9hUKiricm0-vtyKxhA4Itw,13579
4
+ reykit/rdata.py,sha256=hJea_DbDoDlUXHfPlUIsDuaRGBXbo2XlcDzbOSNRpnA,13627
5
5
  reykit/remail.py,sha256=DE4sxfJEXNu6MiBJKUsWXqvBrIOJNmnm_1lnGL0tZec,6693
6
6
  reykit/rimage.py,sha256=yzrvZdYm9A08DjXq9nBRFti6k48o1rVJHv5-V9cnb74,6049
7
7
  reykit/rlog.py,sha256=yBArs48wl509v4q7e1vHbE3E_Bqi3VHEV-Iuw2Y58f8,25649
@@ -21,7 +21,7 @@ reykit/rtime.py,sha256=3UPpUK027TY1Wgf5bzwCQo1N4ZceZ2YtcZzM9I8Q9Qg,17766
21
21
  reykit/rwrap.py,sha256=lOKBhSqx8V_PcsdipPP4SaiGXXcpfaEhO_qEGSySEkw,15065
22
22
  reykit/rdll/__init__.py,sha256=mewj06HHIzzW6oreQAz-6in2zYwNJ4-d1eWWL7CPQgc,685
23
23
  reykit/rdll/rdll_core.py,sha256=zBmOyxD6LkbNIadXmFHLJinj-6UFko8D6w5d7hYA7vU,5077
24
- reykit-1.2.3.dist-info/METADATA,sha256=3Fa13n3d5_hWAhm3VfS5UlR8ili7qrEmG88L7betruI,1923
25
- reykit-1.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
- reykit-1.2.3.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
27
- reykit-1.2.3.dist-info/RECORD,,
24
+ reykit-1.2.4.dist-info/METADATA,sha256=5V5EnFKNsbWMsMkuvOr_CK8PzeascPsmnBvspGMB6fA,1923
25
+ reykit-1.2.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
26
+ reykit-1.2.4.dist-info/licenses/LICENSE,sha256=UYLPqp7BvPiH8yEZduJqmmyEl6hlM3lKrFIefiD4rvk,1059
27
+ reykit-1.2.4.dist-info/RECORD,,
File without changes