2025-09-24 05:10:46 +09:00
|
|
|
|
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; }
|
2026-01-09 09:17:45 +01:00
|
|
|
|
[Required]
|
|
|
|
|
|
[EncryptedString]
|
|
|
|
|
|
public required string MasterKeyWrappedUserKey { get; init; }
|
|
|
|
|
|
[Required]
|
|
|
|
|
|
[StringLength(256)]
|
|
|
|
|
|
public required string Salt { get; init; }
|
2025-09-24 05:10:46 +09:00
|
|
|
|
|
|
|
|
|
|
public MasterPasswordUnlockData ToData()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new MasterPasswordUnlockData
|
|
|
|
|
|
{
|
|
|
|
|
|
Kdf = Kdf.ToData(),
|
|
|
|
|
|
MasterKeyWrappedUserKey = MasterKeyWrappedUserKey,
|
|
|
|
|
|
Salt = Salt
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|