Encode source key.