Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

The module SGLockMBS

module SGLockMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
module Dongle MBS Dongle Plugin 18.5 Yes Yes Yes Yes No
Function: The MBS Module for using SG-Lock dongles in Xojo.
Notes:
See website:
https://www.sg-lock.com

Please read manual from SG Intec for details.

Feedback, Comments & Corrections

  • 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 printAPI
  • 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
  • property Available as Boolean
  • property CounterCount as UInt32
  • property HardwareVersion as UInt32
  • property InterfaceType as UInt32
  • property KeyCount as UInt32
  • property Lasterror as Integer
  • property LibraryError as String
  • property MemorySize as UInt32
  • property MemorySizeBytes as UInt32
  • property SerialNumber as UInt32
  • property SoftwareVersion as UInt32
  • property Type as UInt32

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.

Blog Entries


The items on this page are in the following plugins: MBS Dongle Plugin.




Links
MBS Xojo tutorial videos