Add method to generate nonce