if I have

x^4 - 1 = (x+1)(x-1)(x^2 +1) over F3 (that should be F subscript 3)

then how can I work out all of the ternary codes of say length 4?