updated to 32 byte key
sepearate out apply default/validate functions
to allow for more granular unit testing