change the code of onion

I want to change the encryption and decryption code of Onion routing to complete my experiment

Could you test us more about your experiment and what you want to achieve? Thank you!