encryptionService = $encryptionService; } public function getId(): ?int { return $this->id; } public function getNsec(): ?string { if (null === $this->nsec && null !== $this->encryptedNsec) { $this->nsec = $this->encryptionService->decrypt($this->encryptedNsec); } return $this->nsec; } public function setNsec(?string $nsec): self { $this->nsec = $nsec; $this->encryptedNsec = $this->encryptionService->encrypt($nsec); return $this; } }