Serial creator/validator implemented in java with SHA-256