A method of encapsulating and hermetically sealing a printed circuit board of a flex cable includes: positioning a printed circuit board portion of a flex cable into a channel defined in a first mold half of a mold, the printed circuit board portion including a substrate and electronic components mounted on the substrate; mounting a second mold half onto the first mold half to enclose the channel of the first mold half and form a cavity within the mold; and filling the cavity of the mold with an encapsulation material through an inlet opening defined through the mold.