crypto: api - laying defines and checks for statically allocated buffers