BIT-2021: Add key for individual cipher encryption (#1138)

This commit is contained in:
Ramsey Smith 2024-03-13 15:24:21 -06:00 committed by Álison Fernandes
parent cb4847dbcd
commit 3176b5fe62
3 changed files with 6 additions and 0 deletions

View file

@ -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?,
)

View file

@ -49,6 +49,7 @@ fun Cipher.toEncryptedNetworkCipher(): CipherJsonRequest =
fields = fields?.toEncryptedNetworkFieldList(),
isFavorite = favorite,
card = card?.toEncryptedNetworkCard(),
key = key,
)
/**

View file

@ -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",
)