1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00
Files
mobile/src/Core/Models/Domain/SecureNote.cs
2023-03-20 13:41:21 -03:00

33 lines
749 B
C#

using System.Threading.Tasks;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
using Bit.Core.Models.View;
namespace Bit.Core.Models.Domain
{
public class SecureNote : Domain
{
public SecureNote() { }
public SecureNote(SecureNoteData obj, bool alreadyEncrypted = false)
{
Type = obj.Type;
}
public SecureNoteType Type { get; set; }
public Task<SecureNoteView> DecryptAsync(string orgId, SymmetricCryptoKey key = null)
{
return Task.FromResult(new SecureNoteView(this));
}
public SecureNoteData ToSecureNoteData()
{
return new SecureNoteData
{
Type = Type
};
}
}
}