add encryption key function

use a 1 - 255 byte as encryption key.