I'm trying to port some Python code to Java. I'm not familiar with Python and have never seen this in any language before:
return [c,] + s
What exactly does this line mean? Specifically the [c,] part. Is it combining two arrays or something? s is an array of integers and c is an integer. The full function is below (from Wikipedia: http://en.wikipedia.org/wiki/Ring_signature )
def sign(self,m,z):
self.permut(m)
s,u = [None]*self.n,random.randint(0,self.q)
c = v = self.E(u)
for i in range(z+1,self.n)+range(z):
s[i] = random.randint(0,self.q)
v = self.E(v^self.g(s[i],self.k[i].e,self.k[i].n))
if (i+1)%self.n == 0: c = v
s[z] = self.g(v^u,self.k[z].d,self.k[z].n)
return [c,] + s
Thanks so much!