1. François Van Lerberghe
  2. Valentina Database ADK
  3. Mittwoch, September 28 2016, 08:30 AM
  4.  Abonnieren via E-Mail
Hello,

I want to understand better the VField.IsEncrypted property behavior in Realbasic/Xojo.

I have a database with 1 table that has some fields. One field is encrypted (key = "test";)
In order to use this field, I do :
myVDatabase = new VDatabase
myVDatabase.Open(theFolderItem)
myField = myVDatabase.Table("myTableName";).VField("myFieldName";)
// At this moment, myField.IsEncrypted = FALSE and myField.RequiresEncryptionKey = TRUE
myField.UseEncryptionKey("test";)
// At this moment, myField.IsEncrypted = TRUE and myField.RequiresEncryptionKey = TRUE

Is this the expected behavior ?
What is the exact meaning of the isEncrypted property ? Why is it switched to True after the use of myField.UseEncryptionKey ?
What is the exact meaning of the myField.RequiresEncryptionKey property ? I thought that it should be switched to False after the use of myField.UseEncryptionKey.
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Hi Francois,

after some discussion here resume:

- use RequiresEncryptionKey, to get know if you need specify KEY

- tend to ignore IsEncrypted property.
We are not sure why it have go public, looks as some mostly internal feature.
This property becomes TRUE, when keys already are specified and internal Encryptors are created.

May be we will decide make IsEncrypted property to become deprecated.
Kommentar
There are no comments made yet.
François Van Lerberghe Akzeptierte Antwort
Ok.
Why then RequiresEncryptionKey doesn't switch to False once I've specified the key ? As I understand for now : I cannot rely on this to figure if the field is unlocked.
And according to what you said, the IsEncrypted property can be used just for that. Right ?

What's happening if I specify the encryption key for than once ? Is there some exception or is it allowed flawlessly.
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Why it should?

It answers question: DOES THIS object require Key to use it?
For example VStudio use it to show key-icon near to object.

Yes, you can use get_IsEncrypted == true as indicator that field @unlocked@

2) I have not catch the last your question
Kommentar
There are no comments made yet.
François Van Lerberghe Akzeptierte Antwort
What I ask is this :
Can I call several time UseEncryptionKey on the same field, even if it is unlocked already or is an exception raised in this case ?

myVDatabase.Open(theFolderItem)
myField = myVDatabase.Table("myTableName";).VField("myFieldName";)
// Unlock the field
myField.UseEncryptionKey("test";)
// Second unlock (later, in other place of the software)
myField.UseEncryptionKey("test";)

On the last line, is an exception raised ("Field is already unlocked" for example) or Valentina allow this without crying ?

Ok. I can test, but just to be sure...
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories