예제 #1
0
 public void Save(CiphertextDto ciphertextDto)
 {
     if (ciphertextDto.IsNew())
     {
         ciphertextDto.Id = Guid.NewGuid();
     }
     InternalSave(ciphertextDto);
 }
예제 #2
0
 protected bool Equals(CiphertextDto other)
 {
     return(Id.Equals(other.Id) &&
            Ciphertext.SequenceEqual(other.Ciphertext) &&
            InitializationVector.SequenceEqual(other.InitializationVector) &&
            Salt.SequenceEqual(other.Salt) &&
            Deleted.Equals(other.Deleted));
 }
예제 #3
0
 public void Save(CiphertextDto ciphertextDto)
 {
     if (ciphertextDto.IsNew())
     {
         ciphertextDto.Id = Guid.NewGuid();
     }
     InternalSave(ciphertextDto);
 }
예제 #4
0
 protected override void InternalSave(CiphertextDto ciphertextDto)
 {
     _jsonCiphertexts.Ciphertexts[ciphertextDto.Id] = JsonConvert.SerializeObject(ciphertextDto);
     lock (this)
     {
         _persist(JsonConvert.SerializeObject(_jsonCiphertexts));
     }
 }
예제 #5
0
 protected internal abstract void InternalSave(CiphertextDto ciphertextDto);
예제 #6
0
 public void Delete(Guid accountId)
 {
     var deletedCiphertextDto = new CiphertextDto(accountId, true);
     Save(deletedCiphertextDto);
 }
예제 #7
0
        public void Delete(Guid accountId)
        {
            var deletedCiphertextDto = new CiphertextDto(accountId, true);

            Save(deletedCiphertextDto);
        }
예제 #8
0
 internal protected abstract void InternalSave(CiphertextDto ciphertextDto);
예제 #9
0
 protected bool Equals(CiphertextDto other)
 {
     return Id.Equals(other.Id)
         && Ciphertext.SequenceEqual(other.Ciphertext)
         && InitializationVector.SequenceEqual(other.InitializationVector)
         && Salt.SequenceEqual(other.Salt)
         && Deleted.Equals(other.Deleted);
 }