This correspondence studies resource allocation for a wireless-powered relay network, where a hybrid relay with constant energy supply assists an energy-constrained source to send confidential information to a destination in the presence of an eavesdropper. We propose a novel transmission protocol termed charge-then-cooperate to support secure communications in this network. Specifically, the hybrid relay charges the source in the energy transfer phase; then it forwards the confidential information from the source to the destination and concurrently injects jamming signals to combat eavesdropping. We aim to maximize the secrecy rate of the system via a joint optimization of power allocation and time assignment. To solve the formulated highly non-convex problem, we develop an efficient two-layer optimization algorithm that involves the one-dimensional search, the alternating optimization method, the successive convex approximation technique, and the Lagrange duality method. Simulation results demonstrate that the proposed scheme can guarantee a satisfactory secrecy rate.