Documentation ¶
Index ¶
- func QCmdDecrypt(dev *QEncDevice, data []byte) (ret []byte, err error)
- func QCmdEncrypt(dev *QEncDevice, data []byte) (ret []byte, err error)
- func QCmdGetKeys(dev *QEncDevice) (ret []byte, err error)
- func QCmdGetMode(dev *QEncDevice) (retm QEncMode, retsm QEncSubMode, err error)
- func QCmdInitialize(dev *QEncDevice) (err error)
- func QCmdLock(dev *QEncDevice) (err error)
- func QCmdReset(dev *QEncDevice) (err error)
- func QCmdSetCfgMaxError(dev *QEncDevice, val uint8) (err error)
- func QCmdSetCfgParanoia(dev *QEncDevice) (err error)
- func QCmdSetCfgSecure(dev *QEncDevice, val bool) (err error)
- func QCmdSetCfgTimeout(dev *QEncDevice, val uint8) (err error)
- func QCmdSetKeys(dev *QEncDevice, data []byte) (err error)
- func QCmdUnlock(dev *QEncDevice) (err error)
- func QEncCheckResponse(data []byte) (ret []byte, err error)
- func QEncExit() (err error)
- type QCfg
- type QEncCfg
- type QEncCmd
- type QEncDevice
- func (d *QEncDevice) Close() (err error)
- func (d *QEncDevice) GetBufSize() uint8
- func (d *QEncDevice) GetManufacturer() string
- func (d *QEncDevice) GetPath() string
- func (d *QEncDevice) GetProduct() string
- func (d *QEncDevice) GetProductId() uint16
- func (d *QEncDevice) GetSerial() string
- func (d *QEncDevice) GetVendorId() uint16
- func (d *QEncDevice) Lock() (err error)
- func (d *QEncDevice) Open() (err error)
- func (d *QEncDevice) SendBuffer(data []byte, msg chan string) (ret []byte, err error)
- func (d *QEncDevice) SetLockfile(lockfile string)
- func (d *QEncDevice) UnLock()
- type QEncEndFct
- type QEncErr
- type QEncErrFct
- type QEncError
- type QEncInfoFct
- type QEncMode
- type QEncSubMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QCmdDecrypt ¶
func QCmdDecrypt(dev *QEncDevice, data []byte) (ret []byte, err error)
func QCmdEncrypt ¶
func QCmdEncrypt(dev *QEncDevice, data []byte) (ret []byte, err error)
func QCmdGetKeys ¶
func QCmdGetKeys(dev *QEncDevice) (ret []byte, err error)
func QCmdGetMode ¶
func QCmdGetMode(dev *QEncDevice) (retm QEncMode, retsm QEncSubMode, err error)
func QCmdInitialize ¶
func QCmdInitialize(dev *QEncDevice) (err error)
func QCmdLock ¶
func QCmdLock(dev *QEncDevice) (err error)
func QCmdReset ¶
func QCmdReset(dev *QEncDevice) (err error)
func QCmdSetCfgMaxError ¶
func QCmdSetCfgMaxError(dev *QEncDevice, val uint8) (err error)
func QCmdSetCfgParanoia ¶
func QCmdSetCfgParanoia(dev *QEncDevice) (err error)
func QCmdSetCfgSecure ¶
func QCmdSetCfgSecure(dev *QEncDevice, val bool) (err error)
func QCmdSetCfgTimeout ¶
func QCmdSetCfgTimeout(dev *QEncDevice, val uint8) (err error)
func QCmdSetKeys ¶
func QCmdSetKeys(dev *QEncDevice, data []byte) (err error)
func QCmdUnlock ¶
func QCmdUnlock(dev *QEncDevice) (err error)
func QEncCheckResponse ¶
Types ¶
type QCfg ¶
type QCfg struct {
// contains filtered or unexported fields
}
func QCmdGetCfg ¶
func QCmdGetCfg(dev *QEncDevice) (ret *QCfg, err error)
func (*QCfg) ErrorCount ¶
func (*QCfg) Initialized ¶
func (*QCfg) ParanoiaMode ¶
func (*QCfg) SecureMode ¶
type QEncCmd ¶
type QEncCmd byte
const ( QENC_CMD_RESET QEncCmd = 0x00 QENC_CMD_ENCRYPT QEncCmd = 0x01 QENC_CMD_DECRYPT QEncCmd = 0x02 QENC_CMD_MORE_DATA QEncCmd = 0x03 QENC_CMD_UNLOCK QEncCmd = 0x04 QENC_CMD_LOCK QEncCmd = 0x05 QENC_CMD_SET_CFG QEncCmd = 0x06 QENC_CMD_GET_MODE QEncCmd = 0x07 QENC_CMD_GET_BUFFER QEncCmd = 0x08 QENC_CMD_GET_KEYS QEncCmd = 0x09 QENC_CMD_GET_BUFFSIZE QEncCmd = 0x0A QENC_CMD_SET_KEYS QEncCmd = 0x0B QENC_CMD_GET_CFG QEncCmd = 0x0C QENC_CMD_INITIALIZE QEncCmd = 0x0D QENC_CMD_NONE QEncCmd = 0x0E QENC_CMD_SET_BUFFER QEncCmd = 0x0F )
type QEncDevice ¶
type QEncDevice struct {
// contains filtered or unexported fields
}
func QEncNewDevice ¶
func QEncNewDevice(path string, bufSize uint8, timeout, retryTimeout, retryWait int, lockfile string) *QEncDevice
func QEncScanDevices ¶
func QEncScanDevices(ids ...uint16) (ret []*QEncDevice, err error)
func (*QEncDevice) Close ¶
func (d *QEncDevice) Close() (err error)
func (*QEncDevice) GetBufSize ¶
func (d *QEncDevice) GetBufSize() uint8
func (*QEncDevice) GetManufacturer ¶
func (d *QEncDevice) GetManufacturer() string
func (*QEncDevice) GetPath ¶
func (d *QEncDevice) GetPath() string
func (*QEncDevice) GetProduct ¶
func (d *QEncDevice) GetProduct() string
func (*QEncDevice) GetProductId ¶ added in v0.9.4
func (d *QEncDevice) GetProductId() uint16
func (*QEncDevice) GetSerial ¶
func (d *QEncDevice) GetSerial() string
func (*QEncDevice) GetVendorId ¶ added in v0.9.4
func (d *QEncDevice) GetVendorId() uint16
func (*QEncDevice) Lock ¶ added in v0.9.1
func (d *QEncDevice) Lock() (err error)
func (*QEncDevice) Open ¶
func (d *QEncDevice) Open() (err error)
func (*QEncDevice) SendBuffer ¶
func (d *QEncDevice) SendBuffer(data []byte, msg chan string) (ret []byte, err error)
func (*QEncDevice) SetLockfile ¶ added in v0.9.1
func (d *QEncDevice) SetLockfile(lockfile string)
func (*QEncDevice) UnLock ¶ added in v0.9.1
func (d *QEncDevice) UnLock()
type QEncErr ¶
type QEncErr byte
const ( QENC_ERR_OK QEncErr = 0x00 QENC_ERR_EMPTY_BUF QEncErr = 0x01 QENC_ERR_NO_CTX QEncErr = 0x02 QENC_ERR_NOT_ALLOWED QEncErr = 0x03 QENC_ERR_INVALID QEncErr = 0x04 QENC_ERR_RETRY QEncErr = 0x05 QENC_ERR_HW_SUPPORT QEncErr = 0x06 QENC_ERR_MORE_DATA QEncErr = 0x07 // device retry timeout QENC_ERR_TIMEOUT QEncErr = 0xFF )
type QEncError ¶
type QEncError struct {
// contains filtered or unexported fields
}
func ToQEncError ¶
type QEncSubMode ¶
type QEncSubMode byte
const ( QENC_SUB_MODE_NONE QEncSubMode = 0x00 QENC_SUB_MODE_SEED QEncSubMode = 0x01 QENC_SUB_MODE_PASSWORD QEncSubMode = 0x02 QENC_SUB_MODE_VERIFY_PASSWORD QEncSubMode = 0x03 )
func (QEncSubMode) String ¶
func (e QEncSubMode) String() string
Click to show internal directories.
Click to hide internal directories.