Hydrolyzes 6-aminopenicillinic acid and 7-aminocephalosporanic acid (ACA) derivatives. a beta-lactam + H2O = a substituted beta-amino acid kcat is 0.76 min(-1) with ampicillin as substrate. kcat is 0.68 min(-1) with benzylpenicillin as substrate. kcat is 0.45 min(-1) with amoxicillin as substrate. kcat is 0.45 min(-1) with nitrocefine as substrate. Antibodies against HcpB are present in sera from human patients infected by Helicobacter pylori. Belongs to the hcp beta-lactamase family.