1. A method for encrypting a data stream used to program an FPGA device comprising: determining if there is at least one gap in the data stream; determining whether encryption is enabled for said at least one gap in the data stream; and encrypting said data stream, if encryption is enabled for said at least one gap.