Platforms to show: All Mac Windows Linux Cross-Platform
The module SGLockMBS
module SGLockMBS
The MBS Module for using SG-Lock dongles in Xojo.
See website:
https://www.sg-lock.com
Please read manual from SG Intec for details.
Works on all platforms (except iOS) in case you have a matching dylib/dll/so file.
- 12 properties
- 20 methods
- method Authenticate(AuthentCode as MemoryBlock)
- method Authenticate(AuthentCode() as UInt32)
- method CloseLibrary
- method CryptLock(ProductId as UInt32, KeyNum as UInt32, CryptMode as UInt32, Data as MemoryBlock) as MemoryBlock
- method LoadLibraryFile(File as folderItem) as boolean
- method LoadLibraryPath(Path as String) as boolean
- method ReadConfig(ProductId as UInt32, Category as UInt32 = 0) as MemoryBlock
- method ReadCounter(ProductId as UInt32, CntNum as UInt32) as UInt32
- method ReadData(ProductId as UInt32, Address as UInt32, LongCount as UInt32) as MemoryBlock
- method ReadProductId as UInt32
- method ReadSerialNumber(ProductId as UInt32) as UInt32
- method SearchLock(ProductId as UInt32) as Boolean
- method SignData(ProductId as UInt32, AppSignKey as MemoryBlock, LockSignKeyNum as UInt32, LockSignInterval as UInt32 = 0, Data as MemoryBlock) as MemoryBlock
- method TeaDecipher(data as MemoryBlock, Key as MemoryBlock) as MemoryBlock
- method TeaEncipher(data as MemoryBlock, Key as MemoryBlock) as MemoryBlock
- method VerifyData(ProductId as UInt32, AppSignKey as MemoryBlock, LockSignKeyNum as UInt32, LockSignInterval as UInt32 = 0, Data as MemoryBlock, Signature as MemoryBlock) as Boolean
- method WriteCounter(ProductId as UInt32, CntNum as UInt32, Data as UInt32)
- method WriteData(ProductId as UInt32, Address as UInt32, Data as MemoryBlock)
- method WriteKey(ProductId as UInt32, Address as UInt32, Key as MemoryBlock)
- method WriteProductId(OldProductId as UInt32, NewProductId as UInt32) as Boolean
- 20 constants
SG-Lock Types
| Constant |
Value |
Description |
|
kConfigLockSeries2
|
1 |
Series 2
|
|
kConfigLockSeries3
|
2 |
Series 3
|
|
kConfigLockSeries4
|
3 |
Series 4
|
Crypto Modes
| Constant |
Value |
Description |
|
kCryptModeDecrypt
|
1 |
Decrypt it
|
|
kCryptModeEncrypt
|
0 |
Encrypt it
|
Errors
| Constant |
Value |
Description |
|
kErrorAuthenticationFailed
|
6 |
Authentification with Authenticate failed.
|
|
kErrorAuthenticationRequired
|
5 |
Authentication with Authenticate function not or not error free processed.
|
|
kErrorDongleNotFound
|
1 |
Dongle not found.
|
|
kErrorFunctionNotSupported
|
7 |
The called function is not supported by the found SG-Lock.
|
|
kErrorLPTBusy
|
2 |
The LPT (printer port) is busy.
|
|
kErrorLPTOpenError
|
3 |
The LPT (printer port) could not be opened.
|
|
kErrorNoLPTPortFound
|
4 |
The LPT (printer port) was not found.
|
|
kErrorParameterInvalid
|
8 |
Parameter of the called function is out of the vaild value range.
|
|
kErrorSignatureInvalid
|
9 |
Signature invalid.
|
|
kErrorSuccess
|
0 |
All okay.
|
|
kErrorUSBBusy
|
10 |
Another application is claming the SG-Lock for more than 5 seconds.
|
Interface Types
| Constant |
Value |
Description |
|
kInterfaceLPT
|
1 |
Printer port connection.
|
|
kInterfaceUSB
|
0 |
USB connection.
|
Sign Modes
| Constant |
Value |
Description |
|
kSignModeSign
|
0 |
Sign the data.
|
|
kSignModeVerify
|
1 |
Verify the signature.
|
Some examples which use this module:
Blog Entries
Release notes
The items on this page are in the following plugins: MBS Dongle Plugin.