Generate nonce if caller doesn't provide one.

If the key has KM_TAG_CALLER_NONCE, then the caller is allowed to
provide a nonce.  Previously the assumption was that the caller was
_required_ to provide a nonce. But to play nicer with the Java crypto
API, it's better to make the caller nonce optional if
KM_TAG_CALLER_NONCE is true.

Bug: 19919504
Change-Id: I6189e19017b9026b955f529c7267913de8b04a74
2 files changed