encode(); } public function encode(): string { $data = [ 'nonce' => StringUtility::base64urlEncode($this->nonce), 'cipher' => StringUtility::base64urlEncode($this->cipher), ]; try { return StringUtility::base64urlEncode(json_encode($data, JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR)); } catch (\JsonException) { throw new CipherException('Failed to encode cipher value', 1763068727); } } }