Hash Families and Cover-Free Families with Cryptographic Applications