Separate encryptFrame from editor