(string $token, string $passwordHash)
| 22 | } |
| 23 | |
| 24 | public function isShareAuthenticated(string $token, string $passwordHash): bool |
| 25 | { |
| 26 | $this->removeLegacyPassword($token); |
| 27 | $storedFingerprint = $this->getValue('analytics-share-auth', $token); |
| 28 | return $storedFingerprint !== null |
| 29 | && hash_equals($storedFingerprint, hash('sha256', $passwordHash)); |
| 30 | } |
| 31 | |
| 32 | protected function getValue(string $key, string $token): ?string |
| 33 | { |
no test coverage detected