Importing a session key into CAPI

I've seen a lot of non-optimal code to import a session key into CAPI.  The attached code provides a utility function to do the import.   Note: KeySize depends on the algorithm of the session key.

 

key_import_tester.cpp