We propose a quadratically convergent algorithm for computing the invariant subspaces of a Hermitian matrix. Each iteration of the algorithm consists of one matrix-matrix multiplication and one QR decomposition. We present an accurate convergence analysis of the algorithm without using the big $O$ notation. We also propose a general framework based on implicit rational transformations which allows us to make connections with several existing algorithms and to derive classes of extensions to our basic algorithm with faster convergence rates. Several numerical examples are given which compare some aspects of the existing algorithms and the new algorithms.