There are some issues with your code.
As mentioned in my comment, Decrypt () expects the Cipher Text as input and generates the Decrypted text as an output. However, in your code you're using the Plain text (which you confusingly named "input") as an input. The correct input should be your Cipher Text (which is the output from the Encrypt () ...
I have solved this later I post the question.😂
The solution is using the fact which SPI on the SAMD21 will hang while W102 restarts, so I just set the SAMD21 restart immediately after the program continues.