Skip to content

Commit

Permalink
Android: Fix build: Upgrade react-native-quick-crypto to v0.7.5 (#11294)
Browse files Browse the repository at this point in the history
  • Loading branch information
personalizedrefrigerator authored Oct 30, 2024
1 parent 4c0ec8c commit 441021b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 680 deletions.
2 changes: 1 addition & 1 deletion packages/app-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"react-native-paper": "5.12.5",
"react-native-popup-menu": "0.16.1",
"react-native-quick-actions": "0.3.13",
"react-native-quick-crypto": "0.7.2",
"react-native-quick-crypto": "0.7.5",
"react-native-rsa-native": "2.0.5",
"react-native-safe-area-context": "4.10.8",
"react-native-securerandom": "1.0.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/app-mobile/services/e2ee/crypto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Crypto, CryptoBuffer, Digest, CipherAlgorithm, EncryptionResult, EncryptionParameters } from '@joplin/lib/services/e2ee/types';
import QuickCrypto from 'react-native-quick-crypto';
import { HashAlgorithm } from 'react-native-quick-crypto/lib/typescript/keys';
import type { CipherGCMOptions, CipherGCM, DecipherGCM } from 'crypto';
import {
generateNonce as generateNonceShared,
Expand All @@ -18,7 +17,7 @@ const digestNameMap: DigestNameMap = {

const pbkdf2Raw = (password: string, salt: CryptoBuffer, iterations: number, keylen: number, digest: Digest): Promise<CryptoBuffer> => {
return new Promise((resolve, reject) => {
QuickCrypto.pbkdf2(password, salt, iterations, keylen, digest as HashAlgorithm, (error, result) => {
QuickCrypto.pbkdf2(password, salt, iterations, keylen, digest, (error, result) => {
if (error) {
reject(error);
} else {
Expand Down
Loading

0 comments on commit 441021b

Please sign in to comment.