public void Save(CiphertextDto ciphertextDto) { if (ciphertextDto.IsNew()) { ciphertextDto.Id = Guid.NewGuid(); } InternalSave(ciphertextDto); }
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)); }
protected override void InternalSave(CiphertextDto ciphertextDto) { _jsonCiphertexts.Ciphertexts[ciphertextDto.Id] = JsonConvert.SerializeObject(ciphertextDto); lock (this) { _persist(JsonConvert.SerializeObject(_jsonCiphertexts)); } }
protected internal abstract void InternalSave(CiphertextDto ciphertextDto);
public void Delete(Guid accountId) { var deletedCiphertextDto = new CiphertextDto(accountId, true); Save(deletedCiphertextDto); }
internal protected abstract void InternalSave(CiphertextDto ciphertextDto);
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); }