|
1 | | -# Copyright 2017-2022, Digi International Inc. |
| 1 | +# Copyright 2017-2024, Digi International Inc. |
2 | 2 | # |
3 | 3 | # This Source Code Form is subject to the terms of the Mozilla Public |
4 | 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
@@ -1780,12 +1780,10 @@ def update_bluetooth_password(self, new_password, apply=True, save=True): |
1780 | 1780 | if not isinstance(new_password, (str, bytes, bytearray)): |
1781 | 1781 | raise ValueError("Password must be a string, bytes, or bytearray") |
1782 | 1782 |
|
1783 | | - import srp |
1784 | | - |
1785 | | - # Generate the salt and verifier using the SRP library. |
1786 | | - salt, verifier = srp.create_salted_verification_key( |
1787 | | - self._BLE_API_USERNAME, new_password, hash_alg=srp.SHA256, |
1788 | | - ng_type=srp.NG_1024, salt_len=4) |
| 1783 | + import digi.xbee.util.srp |
| 1784 | + salt, verifier = digi.xbee.util.srp.create_salted_verification_key( |
| 1785 | + self._BLE_API_USERNAME, new_password, hash_alg=digi.xbee.util.srp.HAType.SHA256, |
| 1786 | + ng_type=digi.xbee.util.srp.NgGroupParams.NG_1024, salt_len=4) |
1789 | 1787 |
|
1790 | 1788 | self.update_bluetooth_salt_verifier(salt, verifier, apply=apply, save=save) |
1791 | 1789 |
|
|
0 commit comments