mirror of
https://github.com/bitwarden/server.git
synced 2026-02-02 15:13:19 +08:00
23 lines
669 B
C#
23 lines
669 B
C#
|
|
using System.ComponentModel.DataAnnotations;
|
|||
|
|
using Bit.Core.KeyManagement.Models.Data;
|
|||
|
|
using Bit.Core.Utilities;
|
|||
|
|
|
|||
|
|
namespace Bit.Api.KeyManagement.Models.Requests;
|
|||
|
|
|
|||
|
|
public class MasterPasswordUnlockDataRequestModel
|
|||
|
|
{
|
|||
|
|
public required KdfRequestModel Kdf { get; init; }
|
|||
|
|
[EncryptedString] public required string MasterKeyWrappedUserKey { get; init; }
|
|||
|
|
[StringLength(256)] public required string Salt { get; init; }
|
|||
|
|
|
|||
|
|
public MasterPasswordUnlockData ToData()
|
|||
|
|
{
|
|||
|
|
return new MasterPasswordUnlockData
|
|||
|
|
{
|
|||
|
|
Kdf = Kdf.ToData(),
|
|||
|
|
MasterKeyWrappedUserKey = MasterKeyWrappedUserKey,
|
|||
|
|
Salt = Salt
|
|||
|
|
};
|
|||
|
|
}
|
|||
|
|
}
|