Enabling mavlink 2.0 packet and Signing with pymavlink library

I am trying to set up an authentication over mavlink 2.0 packet with its inbuilt signature feature, But
having a problem while setting up the initial parameter with pymavlink library

I learned for the other sources that to set signing in mavlink 2.0 packet, we need to configure 3 parameters
2)Secret Key

In my case, I am taking timestamp directly from pixhawk which is having GPS on it, and using the same timestamp to create a signature for my arm_diarm mavlink 2.0 packet. For the dummy case, I am using sceret_key=‘x’ and link_id=0 while generating the packet, However, the pixhawk in which I have added the same secret key from the mission planner is discarding the signing packet.

I am attaching my code screenshot

Can anyone help in solving it,I believe I am setting wrong link_id value

Are you using the latest ArduCopter and pymavlink versions?


Yes, I am using the latest Arducopter and pymavlink version

I actually found that a mission planner uses an input seed to generate a secret key. Earlier I thought that the input seed is itself is the secret key. So, I was setting the wrong secret key value from pymavlink side.
However, I am still struggling to find the secret key value set by mission planner that i can use in pymavlink script

Can help me!!