26
Chapter 4: SG-Lock API
4.4 Cryptographic and Signing functions
4.4.1 Function: SglCryptLock
Description
En- or decrypts one or more 64-bit data blocks with 128-bit key. The crypto-
graphic algorithm is TEA.
Types
U2:
U3:
U4:
Declaration
ULONG S g l C r y p t L o c k (
ULONG P r o d u c t I d ,
ULONG KeyNum ,
ULONG CryptMode ,
ULONG B l o c k C n t ,
ULONG * Data ) ;
Parameters
ProductId
Indicates the ProductId of the SG-Lock
KeyNum
Number of key to use
0 to 1 - SG-Lock U3
0 to 15 - SG-Lock U4
CryptMode
Working mode
0 - Encrypt
1 - Decrypt
BlockCnt
Number of data blocks to en- or decrypt
Data
Pointer to data array, where values shall be
copied to. (The developer is responsible to pro-
vide an array with a sufficient size).
Summary of Contents for SG-Lock
Page 2: ......
Page 22: ......
Page 60: ......
Page 62: ...56 Chapter 7 Technical Data Notes ...
Page 63: ...Chapter 7 Technical Data 57 ...