mirror of
https://github.com/bitwarden/android.git
synced 2026-03-12 13:14:35 -05:00
BIT-2021: Add key for individual cipher encryption (#1138)
This commit is contained in:
committed by
Álison Fernandes
parent
cb4847dbcd
commit
3176b5fe62
@@ -22,6 +22,7 @@ import java.time.ZonedDateTime
|
||||
* @property fields A list of fields associated with the cipher (nullable).
|
||||
* @property isFavorite If the cipher is a favorite.
|
||||
* @property card The card of the cipher.
|
||||
* @property key The key of the cipher (nullable).
|
||||
*/
|
||||
@Serializable
|
||||
data class CipherJsonRequest(
|
||||
@@ -67,4 +68,7 @@ data class CipherJsonRequest(
|
||||
|
||||
@SerialName("card")
|
||||
val card: SyncResponseJson.Cipher.Card?,
|
||||
|
||||
@SerialName("key")
|
||||
val key: String?,
|
||||
)
|
||||
|
||||
@@ -49,6 +49,7 @@ fun Cipher.toEncryptedNetworkCipher(): CipherJsonRequest =
|
||||
fields = fields?.toEncryptedNetworkFieldList(),
|
||||
isFavorite = favorite,
|
||||
card = card?.toEncryptedNetworkCard(),
|
||||
key = key,
|
||||
)
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,4 +21,5 @@ fun createMockCipherJsonRequest(number: Int, hasNullUri: Boolean = false): Ciphe
|
||||
reprompt = CipherRepromptTypeJson.NONE,
|
||||
secureNote = createMockSecureNote(),
|
||||
lastKnownRevisionDate = ZonedDateTime.parse("2023-10-27T12:00:00Z"),
|
||||
key = "mockKey-$number",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user