A Generic Security API for Symmetric Key Management on Cryptographic Devices