Added data valid to the API.
Fixed input to reg update of keylen and rounds.