Firstly, this paper explained the RAM information on the CMOS chip. Then it expounded the principle and method of using the information to encrypt a file and gave the concrete programming. The practice testified that this method was simple and effective.