Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Ver 5 Security Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ver 5 Security Question

    I understand that v.5 will allow you to encrypt tables IF you assign a password to the database. Since I have my own password schema, will v.5 allow you to enter the database password in xbasic (say in the autoexec script)? Otherwise, users will have to enter two passwords, A5's and the custom one already implemented (or use v.5's password model).

    OR, is there a way to encrypt tables w/o the database password?

    Peter
    Peter
    AlphaBase Solutions, LLC

    [email protected]
    https://www.alphabasesolutions.com



    #2
    RE: Ver 5 Security Question

    peter this all i found on the subject


    Encrypting Tables
    Alpha Five allows you to encrypt tables so that people who do not know the password cannot read them. This is particularly important because Alpha Five uses a very common file format for its data, the .dbf format, which many programs can read. Once you have encrypted a table, other programs cannot read it.
    After a table has been encrypted, it is displayed in the Control Panel with a lock on the icon. In addition, if the decryption key has not been set, a question mark is displayed on the icon, indicating that Alpha Five cannot read the table yet.

    Icon for an encrypted table. Alpha Five can read the table because the decryption key has been set.
    Icon for an encrypted table. Alpha Five cannot read the table because the decryption key has not yet been set.

    Alpha Five provides several functions to encrypt and decrypt tables. These are described below.
    NOTE While Alpha Five does provide the low level Xbasic commands described below to encrypt and decrypt tables, this is not the typical way in which encryption is used. It is more convenient to use the encrypt tables using the user interface commands. You can access the encryption feature once a Master Password has been set for the database (which is done using the Tools, Security command when the Control Panel has focus). Once the Master Password for the database has been set, you can use the Tools, Encrypt/Decrypt tables command to encrypt or decrypt tables. The Master Password is used as the encryption key for all tables. You would only use the Xbasic methods described below if you want to have more control over the encryption and decryption of tables than Alpha Five's built in security features offer.

    .encrypt()
    Syntax:
    Flag = .encrypt([Encryption key])
    Description:
    Encrypts the table referenced by the object pointer, . Flag is .T. if the operation is successful. If Encryption key is not specified, Alpha Five uses the default encryption key. The default encryption key can be changed using the default_encryption_key_set() function.
    Alpha Five requires exclusive access to the table in order to encrypt it.
    Example:

    'Encrypt a table using the default key
    '-----------------------------------------------------------------
    t = table.open("customer")
    t.encrypt()
    t.close()

    'Encrypt a table using a specific key
    '-----------------------------------------------------------------
    t = table.open("customer")
    t.encrypt("swordfish")
    t.close()


    See Also:
    .memo_write_to_file()
    .decrypt()
    Syntax:
    Flag = .decrypt()
    Description:
    Decrypts the table referenced by the object pointer, . Flag is .T. if the operation is successful.
    Alpha Five requires exclusive access to the table in order to decrypt it.
    Example:

    'Decrypt a table
    '-----------------------------------------------------------------
    t = table.open("customer")
    t.decrypt()
    t.close()

    See Also:
    .memo_write_to_file()

    default_encryption_key_set()
    Syntax:
    default_encryption_key_set(Encryption Key)
    Description:
    Sets the default key that Alpha Five will use to encrypt and decrypt tables. If the default encryption key is not set to the same key that was used to initially encrypt a table, the table's icon in the Control Panel is shown with a lock on it.
    Example:

    'Sets the encryption key to "Fish"
    '-----------------------------------------------------------------
    default_encryption_key_set("fish")

    See Also:
    .memo_write_to_file()




    L .encrypted()
    Returns .T. if table is encrypted, else returns .F.

    Also added are a forth parameter (after alias) to table.open() and table.reset(), plus
    a third parameter (after mode) to set.open()

    This parameter is an optional encrytion_key which will be used to decode the file
    during file reads.

    There are new icons that display on the control panel for tables that are encrypted using
    the default key, or some other key.

    Tables that are encrypted using the default key appear with a padlock icon overlayed on
    the standard table icon. These 'default' encrypted tables can be loaded, operated on etc
    directly from a5, but the tables are inaccessable from other applications that read DBF
    files.

    Also - if the default key has not been set, Alpha five won't even be able to read them.

    Tables that are encrypted with keys other than the default key (or if the default key hasn't
    even been defined yet) - will show up with a padlock and a question mark icon.

    If you wish to experiment with this feature, I would advise working on a 'copy' of your data -

    I have found and fixed every problem I have encountered thus far (i.e, like appends etc,
    which due to file handle duplication ended up mixing and matching encrypted data with
    other data).

    Here is a sample session - say you a table called "names.dbf" which is a list of
    names that you want to protect from prying eyes.
    in the interactive window
    t = table.open("names")
    t.encrypt("swordfish")
    t.close()

    If you look back at the control panel, you will notice that the icon for the table changed
    to a table with a padlock and question mark -- this means that alpha five cannot load
    the table because it is encrypted with a key, and there is no default key defined yet...
    (Try clicking on the table or any of its associated layouts, you will encounter an error
    - file is encrypted & you don't have the key!) -- if the icon doesn't show up immediatly, you
    may need to click between panels,

    however we can still use the table from xbasic...
    t = table.open("names",0,"","swordfish")
    t.fetch_first()
    trace.writeln("I can see that the first name in names.dbf is "+t.name+" and you can't!")
    t.close()

    Now using tables from xbasic only is a little restrictive, so lets define the default key
    from the interactive window:
    default_encryption_key_set("swordfish")

    You will notice after doing this that the table icon loses its question mark, and just has
    a padlock -- this means that alpha five can use the DBF, but nobody else can (including
    other sessions of A5 that don't know the encryption key value)...

    Now if you click on browse/form append etc - they all work.
    Now lets say you wanted to decrypt the file so that it was available publicly once again
    t = table.open("names",0,"","swordfish")
    t.decrypt()
    t.close()

    Comment


      #3
      RE: Ver 5 Security Question

      Hello Nick,

      Thanks a million. This is music to my ears! Just what I wanted.

      Peter
      Peter
      AlphaBase Solutions, LLC

      [email protected]
      https://www.alphabasesolutions.com


      Comment


        #4
        RE: Ver 5 Security Question

        When I tried to use this code I received the error:
        encrypt method not found
        Maybe I didn't understand the proper place for the code. I placed the code in the Code Editor in the Interactive window.

        Comment


          #5
          RE: Ver 5 Security Question

          It requires ver. 5 which is not available yet.
          Peter
          AlphaBase Solutions, LLC

          [email protected]
          https://www.alphabasesolutions.com


          Comment

          Working...
          X