public byte[] encrypt(byte[] input) {
			int kl = key.length, il = input.length;
			int iterations = il / kl;
			if(il % kl > 0) iterations++;
			for(int i = 0; i < iterations; i++) {
				byte[] keystream = new byte[kl];
				salsa20.crypto_stream(keystream, kl, nonce, 0, key);
				int lim = (i+1) * kl;
				// In the last iteration, the input length is our limit
				if(lim > il) lim = il;
				for(int n = i * kl; n < lim; n++) {
					input[n] ^= keystream[n % kl];
				}
				nextNonce();				
			}
			return input;
		}