With a key pair, fs-verity signature can be generated by simply running fsverity_metadata_generator
command line tool, which uses fsverity-util.
fsverity_metadata_generator --fsverity-path {fsverity_path} --key key.pem --key-format pem \ --cert cert.pem --signature pkcs7 --output test.data.fsv_meta test.data