Skip to content

armgit / ente

Public Imported from GitHub
0

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

B64 variant

Manav Rathi2e0ad673cf9a
diff --git a/web/packages/base/crypto/types.ts b/web/packages/base/crypto/types.ts
index bafff0165a..d6d46fb8d6 100644
--- a/web/packages/base/crypto/types.ts
+++ b/web/packages/base/crypto/types.ts
@@ -54,6 +54,24 @@ export interface EncryptedBoxBytes {
nonceB64: string;
}
+/**
+ * A variant of {@link EncryptedBoxBytes} with the encrypted data encoded as a
+ * base64 string.
+ */
+export interface EncryptedBox64 {
+ /**
+ * A base64 string containing the encrypted data.
+ */
+ encryptedDataB64: string;
+ /**
+ * A base64 string containing the nonce used during encryption.
+ *
+ * A randomly generated nonce for this encryption. It does not need to be
+ * confidential, but it will be required to decrypt the data.
+ */
+ nonceB64: string;
+}
+
/**
* The result of encryption using the secretstream APIs used in one-shot mode.
*
@@ -78,10 +96,8 @@ export interface EncryptedBlobBytes {
}
/**
- * The result of encryption using the secretstream APIs used in one-shot mode,
- * with the encrypted data encoded as a base64 string.
- *
- * This is a variant of {@link EncryptedBlobBytes}.
+ * A variant of {@link EncryptedBlobBytes} with the encrypted data encoded as a
+ * base64 string.
*/
export interface EncryptedBlobB64 {
/**
@@ -101,7 +117,9 @@ export interface EncryptedBlobB64 {
* A decryption request with the encrypted Blob's data as bytes.
*
* This is a request to decrypt data encrypted using the secretstream APIs in
- * one-shot mode. See: [Note: 3 forms of encryption (Box | Blob | Stream)].
+ * one-shot mode.
+ *
+ * See: [Note: 3 forms of encryption (Box | Blob | Stream)].
*/
export interface DecryptBlobBytes {
/**
@@ -123,10 +141,8 @@ export interface DecryptBlobBytes {
}
/**
- * A decryption request with the encrypted Blob's data as a base64 encoded
- * string.
- *
- * This is a variant of {@link DecryptBlobBytes}.
+ * A variant of {@link DecryptBlobBytes} with the encrypted Blob's data as a
+ * base64 encoded string.
*/
export interface DecryptBlobB64 {
/**