First implementation of password and salt generation

is this a correct salt ? no pun intented, I just don't know anything about security :)