In this work, novel physical layer security (PLS) schemes are proposed for orthogonal frequency-division multiplexing (OFDM) to secure both data and pilots. The majority of previous studies focus on only securing the data without considering the security of the pilots used for channel estimation. However, the leakage of channel state information (CSI) from a legitimate node to an eavesdropper allows the latter to acquire knowledge about the channel of the legitimate nodes. To this end, we propose adaptive and flexible PLS algorithms which can 1) secure data, 2) secure pilots, and 3) jointly secure both data and pilots. Particularly, minimum-phase all-pass channel decomposition is exploited, where the proposed algorithms use the all-pass component to provide security without harming the performance of the legitimate user. In the analysis for data security, we evaluated the secrecy under correlated and uncorrelated eavesdropping channels via closed-form bit error rate (BER) formulas. For pilot security, we analyzed the normalized mean squared error (NMSE) performance of the estimated channel. The simulation results along with theoretical analysis demonstrate that the proposed algorithms can effectively enhance the communication secrecy of the overall system.