// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; import {Ownable} from "openzeppelin-contracts/contracts/access/Ownable.sol"; contract SSLFingerprintRegistry is Ownable { mapping(bytes32 => bytes32) public idToFingerprint; constructor() Ownable(msg.sender) {} event FingerprintUpdated( bytes32 indexed hashedIdentifier, bytes32 indexed fingerprint, string identifier ); function getFingerprints( string[] calldata identifiers ) public view returns (bytes32[] memory fingerprints) { fingerprints = new bytes32[](identifiers.length); for (uint i = 0; i < identifiers.length; i++) { fingerprints[i] = idToFingerprint[ keccak256(abi.encode(identifiers[i])) ]; } } function updateFingerprints( string[] calldata identifiers, bytes32[] calldata fingerprints ) external onlyOwner { for (uint i = 0; i < identifiers.length; i++) { bytes32 hashedIdentifier = keccak256(abi.encode(identifiers[i])); idToFingerprint[hashedIdentifier] = fingerprints[i]; emit FingerprintUpdated( hashedIdentifier, fingerprints[i], identifiers[i] ); } } }