1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-06-28 10:54:59 +02:00
bitwarden-mobile/src/Core/Models/Domain/Folder.cs
Matt Gibson a3b4ede8f3
Use CipherByteArray to signify encrypted byte[] (#1366)
* Use CipherByteArray to signify encrypted  byte[]

* Rename CipherString and CipherByteArray to EncString and EncByteArray
2021-04-21 15:27:14 -05:00

33 lines
871 B
C#

using Bit.Core.Models.Data;
using Bit.Core.Models.View;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Bit.Core.Models.Domain
{
public class Folder : Domain
{
public Folder() { }
public Folder(FolderData obj, bool alreadyEncrypted = false)
{
BuildDomainModel(this, obj, new HashSet<string>
{
"Id",
"Name"
}, alreadyEncrypted, new HashSet<string> { "Id" });
RevisionDate = obj.RevisionDate;
}
public string Id { get; set; }
public EncString Name { get; set; }
public DateTime RevisionDate { get; set; }
public Task<FolderView> DecryptAsync()
{
return DecryptObjAsync(new FolderView(this), this, new HashSet<string> { "Name" }, null);
}
}
}