mirror of
https://github.com/bitwarden/android.git
synced 2025-03-15 18:58:59 +03:00
BIT-2021: Add key for individual cipher encryption (#1138)
This commit is contained in:
parent
cb4847dbcd
commit
3176b5fe62
3 changed files with 6 additions and 0 deletions
|
@ -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",
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue