Skip to content

Commit

Permalink
chore: Bump @foxt/js-srp to 0.0.3-patch2
Browse files Browse the repository at this point in the history
  • Loading branch information
steilerDev committed Feb 10, 2025
1 parent 86ca377 commit d07fb64
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ Please check the [contributing guidelines](https://github.com/steilerDev/icloud-

## Acknowledgments

Special thanks to [@foxt](https://foxt.dev/) for helping with reverse engineering the iCloud API ([GSA](https://github.com/steilerDev/icloud-photos-sync/issues/363) & [ADP](https://github.com/steilerDev/icloud-photos-sync/issues/202)). Check out [iCloud.js](https://github.com/foxt/icloud.js), in case you need to access other aspects of iCloud.
Special thanks to:
- [@foxt](https://foxt.dev/) for helping with reverse engineering the iCloud API ([GSA](https://github.com/steilerDev/icloud-photos-sync/issues/363) & [ADP](https://github.com/steilerDev/icloud-photos-sync/issues/202)). Check out [iCloud.js](https://github.com/foxt/icloud.js), in case you need to access other aspects of iCloud.
- [@konraddysput](https://github.com/konraddysput) for help on the Backtrace integration

### Release Workflow

Expand Down
9 changes: 5 additions & 4 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
},
"dependencies": {
"@backtrace/node": "^0.7.0",
"@foxt/js-srp": "^0.0.3-patch1",
"@foxt/js-srp": "^0.0.3-patch2",
"@inquirer/prompts": "^7.3.1",
"@steilerdev/axios-har-tracker": "^0.6.0",
"ajv": "^8.17.1",
Expand Down
3 changes: 2 additions & 1 deletion app/src/lib/icloud/icloud.crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export class iCloudCrypto {
* @returns A Promise that will resolve to the derived password key
*/
async derivePassword(protocol: SRPProtocol, salt: string, iterations: number): Promise<Uint8Array> {
let passHash = new Uint8Array(await util.hash(this.srp.h, Buffer.from(Resources.manager().password)));
const encodedPassword = new TextEncoder().encode(Resources.manager().password)
let passHash = new Uint8Array(await util.hash(this.srp.h, encodedPassword.buffer as ArrayBuffer));
if (protocol === `s2k_fo`) {
passHash = Buffer.from(util.toHex(passHash));
}
Expand Down

0 comments on commit d07fb64

Please sign in to comment.