I’m not sure I understand the question – the instructions for generating the source key are in the code. ASAIU, the device key is the “sink key”.