Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Reorder

Manav Rathi8b4e66e37c97
diff --git a/web/packages/base/crypto/index.ts b/web/packages/base/crypto/index.ts
index 1e623deba1..e035ac1e52 100644
--- a/web/packages/base/crypto/index.ts
+++ b/web/packages/base/crypto/index.ts
@@ -134,14 +134,6 @@ export const createComlinkCryptoWorker = () =>
export const toB64 = (bytes: Uint8Array): Promise<string> =>
inWorker() ? ei._toB64(bytes) : sharedWorker().then((w) => w.toB64(bytes));
-/**
- * URL safe variant of {@link toB64}.
- */
-export const toB64URLSafe = (bytes: Uint8Array): Promise<string> =>
- inWorker()
- ? ei._toB64URLSafe(bytes)
- : sharedWorker().then((w) => w.toB64URLSafe(bytes));
-
/**
* Convert a base64 string to bytes ({@link Uint8Array}).
*/
@@ -150,6 +142,14 @@ export const fromB64 = (b64String: string): Promise<Uint8Array> =>
? ei._fromB64(b64String)
: sharedWorker().then((w) => w.fromB64(b64String));
+/**
+ * URL safe variant of {@link toB64}.
+ */
+export const toB64URLSafe = (bytes: Uint8Array): Promise<string> =>
+ inWorker()
+ ? ei._toB64URLSafe(bytes)
+ : sharedWorker().then((w) => w.toB64URLSafe(bytes));
+
/**
* Convert a base64 string to the hex representation of the underlying bytes.
*/