For encryption, the data types do not really matter as long as you know the length of the data that you wish to encrypt.
For example, in Windows, you can use the Crypto API function
CryptEncrypt[
^] to encrypt data.
So if you wish to encrypt a variable called
myStruct
of type
MyStruct
having different data types, pass
&myStruct
as the
pbData
parameter and
sizeof(MyStruct)
as the
pdwDataLen
parameter.