()
| 140 | } |
| 141 | |
| 142 | public static function requireMasterKey(): string |
| 143 | { |
| 144 | $k = self::getMasterKeyOrNull(); |
| 145 | if ($k === null) { |
| 146 | throw new \RuntimeException('Encryption master key missing. Set FR_ENCRYPTION_MASTER_KEY or provide META_DIR/encryption_master.key (32 bytes).'); |
| 147 | } |
| 148 | return $k; |
| 149 | } |
| 150 | |
| 151 | private static function packU64BE(int $n): string |
| 152 | { |
no test coverage detected