You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
844 B
28 lines
844 B
14 years ago
|
//////////////////////////////////////////////////////////////////////////////////
|
||
|
// Name: actSCardUtil.h
|
||
|
// Product: cv act library
|
||
|
// Purpose: useful global functions
|
||
|
//
|
||
|
// Copyright: (c) 2008 cv cryptovision GmbH
|
||
|
// all rights reserved
|
||
|
// Licence: The conditions for the use of this software are regulated
|
||
|
// in the cv act library licence agreement.
|
||
|
//////////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
#ifndef actSCardUtil_h
|
||
|
#define actSCardUtil_h
|
||
|
|
||
|
namespace act
|
||
|
{
|
||
|
// ---------------------------------------------------------------------------
|
||
|
template<class BlobT>
|
||
|
inline BlobT short2blob(unsigned short n)
|
||
|
{
|
||
|
byte data[2] = { byte((n >> 8) & 0xff), byte(n & 0xff) };
|
||
|
return BlobT(&data[0], &data[0] + sizeof(data));
|
||
|
}
|
||
|
|
||
|
} // namespace act
|
||
|
|
||
|
#endif // actSCardUtil_h
|