TUniEncryptor Sample.
Posted: Fri 06 Jul 2012 23:58
Is there any example regarding TUniEncryptor?
I'm not able to figure out how it works..
Thanks in advance!
I'm not able to figure out how it works..
Thanks in advance!
Discussion forums for open issues and questions concerning database tools, data access components and developer tools from Devart
https://forums.devart.com/
Firebird, v2.5AlexP wrote:Please specify your database name.
Code: Select all
CREATE TABLE EMP (
EMPNO INTEGER NOT NULL PRIMARY KEY,
ENAME CHAR(2000) CHARACTER SET OCTETS COLLATE OCTETS,
HIREDATE CHAR(200) CHARACTER SET OCTETS COLLATE OCTETS,
SAL CHAR(200) CHARACTER SET OCTETS COLLATE OCTETS,
FOTO BLOB SUB_TYPE 0
)Code: Select all
UniQuery.SQL.Text := 'SELECT * FROM EMP';
UniQuery.Encryption.Encryptor := UniEncryptor;
UniQuery.Encryption.Fields := 'ENAME, HIREDATE, SAL, FOTO';
UniEncryptor.Password := '11111';
UniQuery.DataTypeMap.AddFieldNameRule ('ENAME', ftString);
UniQuery.DataTypeMap.AddFieldNameRule ('HIREDATE', ftDateTime);
UniQuery.DataTypeMap.AddFieldNameRule ('SAL', ftFloat);
UniQuery.Open;Code: Select all
CREATE TABLE EMP (
EMPNO INTEGER NOT NULL PRIMARY KEY,
ENAME VARCHAR(2000) CHARACTER SET OCTETS COLLATE OCTETS,
SAL VARCHAR(200) CHARACTER SET OCTETS COLLATE OCTETS,
FOTO BLOB SUB_TYPE 0
)Code: Select all
UniQuery.SQL.Text := 'SELECT * FROM EMP';
UniQuery.Encryption.Encryptor := UniEncryptor;
UniQuery.Encryption.Fields := 'ENAME, SAL, FOTO';
UniEncryptor.Password := '11111';
UniQuery.DataTypeMap.AddFieldNameRule ('ENAME', ftString);
UniQuery.DataTypeMap.AddFieldNameRule ('SAL', ftFloat);
UniQuery.Open;
I followed your steps to the letter.AndreyZ wrote:We have fixed this problem with Data Type Mapping.

My pleasure!AndreyZ wrote:Thank you for the information. We have reproduced and fixed this problem. This fix will be included in the next UniDAC build.