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

Encrypt CSV file?

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

    Encrypt CSV file?

    Hi All,

    I have exported data to a CSV file which contains very personal information.

    How do I encrypt this file which can then only be decrypted with the correct key on another machine that is not running Alpha?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    #2
    Re: Encrypt CSV file?

    Encrypt_string()

    Code:
    tst = <<%txt%
    #12345,"new line",some unquoted text,.T.,45.77,{03/14/2012},more unquoted text,"more quoted text"
    #987654,"second line",some (2) unquoted text,.F.,77.45,{04/13/2010},more (2)unquoted text,"more (2) quoted text"
    #%txt%
    
    ? tst
    = 12345,"new line",some unquoted text,.T.,45.77,{03/14/2012},more unquoted text,"more quoted text"
    987654,"second line",some (2) unquoted text,.F.,77.45,{04/13/2010},more (2)unquoted text,"more (2) quoted text"
    
    
    ? encrypt_string(tst,"Keith")
    = =�,srg%9"PC#,4-@[{.W$f~u>+`&^'G<jlw5|:K&+gN:jt3 01,j\cYI6JT=avI$pn_<m#z/ =Jg6tczPMR<I>P:[8vtRZy:{)d�VWK1sZ1�a8#380n0^k(;G>8)tPw#k4%4d/x&D,B6'Vmkh8m'&%/x2N1#!QiO9\Y)|GK5 2}760a3mo\-`%[email protected];D9d-<bboYrF(G,Yj�
    
    encr_tst = encrypt_string(tst,"Keith")
    
    ? encr_tst
    = =�,srg%9"PC#,4-@[{.W$f~u>+`&^'G<jlw5|:K&+gN:jt3 01,j\cYI6JT=avI$pn_<m#z/ =Jg6tczPMR<I>P:[8vtRZy:{)d�VWK1sZ1�a8#380n0^k(;G>8)tPw#k4%4d/x&D,B6'Vmkh8m'&%/x2N1#!QiO9\Y)|GK5 2}760a3mo\-`%[email protected];D9d-<bboYrF(G,Yj�
    
    ? decrypt_string(encr_tst,"Stan")
    = _#yexL4d2uwo7]u:\1n8`+t|:o_!}2|9Pgwb#aN]_xvAAUC{4ec31$H,d9M}T]o?[:.Ps%-"\./5>Hwm!|YmicT-:y+E'C-T
    q#qLg \lap_onns7,(L:,b-I-|)TI8|ou4ua9QcoXYXv|x#md!)u#K;e`Y>@4.u^*eLLXv!0dc+Z2?9?L@o_"pY?Bu~?K}sFq6cPsdqA;2fL]q%
    
    ? decrypt_string(encr_tst)
    = ~G12$JjVA{}f|TYm&vz1}9f5Gz*`Ri~H/HB$d]JF"dQ(U4?0pF"4vw=8C (gR``3D[9'53YSEgLg z `q"~n9H|3F,QuL*J��xPd@t9+D*L+<Gj]+qY@\&^+YW=[6},$3`Y'g?@|"fzi#`Dmv]=@$v#/-0S+xY&0LUb}i0x:MAS;r`#JORAR92`|}1AOab!GM`EyFj4d4[Oj��
    
    ? decrypt_string(encr_tst,"Keith")
    = 12345,"new line",some unquoted text,.T.,45.77,{03/14/2012},more unquoted text,"more quoted text"
    987654,"second line",some (2) unquoted text,.F.,77.45,{04/13/2010},more (2)unquoted text,"more (2) quoted text"
    Last edited by Stan Mathews; 07-17-2012, 09:19 AM.
    There can be only one.

    Comment


      #3
      Re: Encrypt CSV file?

      For the file saving, sending, etc.

      Code:
      tst = <<%txt%
      #12345,"new line",some unquoted text,.T.,45.77,{03/14/2012},more unquoted text,"more quoted text"
      #987654,"second line",some (2) unquoted text,.F.,77.45,{04/13/2010},more (2)unquoted text,"more (2) quoted text"
      #%txt%
      encr_str = encrypt_string(tst,"Keith")
      
      save_to_file(encr_str,"C:\keith_encrypted.txt")
      
      read_file = get_from_file("C:\keith_encrypted.txt")
      ? read_file
      = =�,srg%9"PC#,4-@[{.W$f~u>+`&^'G<jlw5|:K&+gN:jt3 01,j\cYI6JT=avI$pn_<m#z/ =Jg6tczPMR<I>P:[8vtRZy:{)d�VWK1sZ1�a8#380n0^k(;G>8)tPw#k4%4d/x&D,B6'Vmkh8m'&%/x2N1#!QiO9\Y)|GK5 2}760a3mo\-`%[email protected];D9d-<bboYrF(G,Yj�
      
      unencr_str = decrypt_string(read_file,"Keith")
      ? unencr_str
      = 12345,"new line",some unquoted text,.T.,45.77,{03/14/2012},more unquoted text,"more quoted text"
      987654,"second line",some (2) unquoted text,.F.,77.45,{04/13/2010},more (2)unquoted text,"more (2) quoted text"
      
      
      unencr_file = save_to_file(unencr_str,"C:\keith_unencrypted.txt")
      There can be only one.

      Comment


        #4
        Re: Encrypt CSV file?

        Stan,
        I think the key here is that the other machine doesn't have alpha. My take on this is that there needs to be some sort of 3rd party encryption/decryption routine used.

        Tom

        Comment


          #5
          Re: Encrypt CSV file?

          Keith,
          What tool is the recipient going to be using to decrypt the string?
          How much text is in the encrypted string?
          Last edited by Mike Wilson; 07-17-2012, 10:02 AM.
          Mike W
          __________________________
          "I rebel in at least small things to express to the world that I have not completely surrendered"

          Comment


            #6
            Re: Encrypt CSV file?

            The following uses a director key string that is the key to producing and deciphering the encrypted message.
            This code produces a number string from the message with an added 4 at the front. After removing the 4 from the begining, each two characters in the encryped string represents the position number in the director key string. The recipient can decrypt the string if they have the director key string. It's computer generated on your end, but without alpha on the other end, decryting is manual.

            Code:
            '% = line feed
            '^ = space
            '# = comma
            '! = :
            
            dim dirstr as C="%^#!Dlf52OZ9eCiL0rvXu8UWwy6JKQGAHmo4zTIFdphnVgtxs7jNE3q1SbMYkcaRBP"
            
            dim vmess as C
            dim vencr_str as C
            vmess=<<%m%
            Mike Wilson
            1234 Pine Circle
            Battle Creek, MI 12345
            SSN: 9908978897
            BANK: 180908889767
            AMOUNT: 1234534677
            %m%
            
            dim vreplace as C
            vreplace=chrtran(vmess,crlf(),"%")
            vreplace=chrtran(vreplace," ","^")
            vreplace=chrtran(vreplace,",","#")
            vreplace=chrtran(vreplace,":","!")
            msgbox(vreplace)
            
            dim vml as n
            vml=len(vreplace)
            
            dim vlw as C
            dim vnw as N
            dim vcw as C
            
            for i = 1 to vml
            	vlw=substr(vmess,i,1)
            	vnw=at(vlw,dirstr)
            	vcw=alltrim(str(vnw))
            	vcw=padl(vcw,2,"0")
            	vencr_str=vencr_str+vcw
            	vcw=""
            next
            
            ' add a 4 at the begining to frame shift
            vencr_str="4"+vencr_str
            
            msgbox("This is the encrypted string",vencr_str)
            The dirstr I generated with a function I have that shuffles all the letters, upper and lower case and all numbers through 20,000 shuffle iterations into a random sequence.
            Last edited by Mike Wilson; 07-17-2012, 11:10 AM.
            Mike W
            __________________________
            "I rebel in at least small things to express to the world that I have not completely surrendered"

            Comment


              #7
              Re: Encrypt CSV file?

              Correct of course, I didn't read the post closely enough. Silly me, I assumed it was an Alpha question.
              There can be only one.

              Comment


                #8
                Re: Encrypt CSV file?

                Keith, did you decrypt the Zipped document I sent in a PM?
                Using jZip (thanks Stan) it is easily possible to zip the CSV and send it to your 3rd party. There are 2 levels of encryption offered. Suggest you go for the 256bit AES encryption.
                It is possible (according to the jZip documentation) to set the encryption at the command level so you should be able to use Alpha to create, zip, encrypt and send the data.
                The decryption key can be txtd or mailed separately, or you could have an agreed TestKey.
                See our Hybrid Option here;
                https://hybridapps.example-software.com/


                Apologies to anyone I haven't managed to upset yet.
                You are held in a queue and I will get to you soon.

                Comment


                  #9
                  Re: Encrypt CSV file?

                  Hi Ted,

                  Thanks for your sample and suggestion. Unfortunately the service company needs more automation in handling the incoming files that need to be processed.
                  Regards
                  Keith Hubert
                  Alpha Guild Member
                  London.
                  KHDB Management Systems
                  Skype = keith.hubert


                  For your day-to-day Needs, you Need an Alpha Database!

                  Comment


                    #10
                    Re: Encrypt CSV file?

                    The simplest thing that comes to mind, is to use Windows encryption.
                    In Windows 7, to encrypt:
                    1. Right-click the folder or file you want to encrypt, and then click Properties.
                    2. Click the General tab, and then click Advanced.
                    3 Select the Encrypt contents to secure data check box, and then click OK.

                    To decrypt:
                    1. Right-click the folder or file you want to decrypt, and then click Properties.
                    2. Click the General tab, and then click Advanced.
                    3. Clear the Encrypt contents to secure data check box, and then click OK.
                    Or
                    You could send it as an email attachment (Make sure your email service provider will encrypt it).

                    Comment


                      #11
                      Re: Encrypt CSV file?

                      Hi Gabe,

                      Thanks for your imput. This will not work as the user must NOT have access to the file in un-encrypted format.
                      Regards
                      Keith Hubert
                      Alpha Guild Member
                      London.
                      KHDB Management Systems
                      Skype = keith.hubert


                      For your day-to-day Needs, you Need an Alpha Database!

                      Comment


                        #12
                        Re: Encrypt CSV file?

                        You lost me!
                        The file will be encrypted.
                        Don't you want the user to be able to decrypt it?
                        If not? What is the point?
                        Let the user look at it and dazzle?

                        Comment


                          #13
                          Re: Encrypt CSV file?

                          Re-reading your original post (which in the spirit of encryption, is an encrypted question!) I surmise that:
                          You want to save a file on machine A
                          You want the file to be saved as an encrypted file (or so you conclude)
                          You want the user to be able to decrypt it (on machine A, or perhaps other machines) with the "correct key"

                          Let me decrypt "correct key":
                          password.
                          You need to password-protect the file, encrypted or not.

                          Comment


                            #14
                            Re: Encrypt CSV file?

                            Keith, the person who designed Storing's web site had an encryption program from a company called Persists Software Inc www.persits.com called AspEncrypt which they used to encrypt the CSV file they exported from the web site. The users had the decrypt software on their PC which they used to decrypt the file.

                            I am afraid I don't know how the encryption side worked but as I just had some code to run the decrypt part. The person who looks after their web site might know.
                            Jenny Earnshaw
                            BusinessPlus (Letchworth) Ltd

                            Comment


                              #15
                              Re: Encrypt CSV file?

                              Hi Gabe,
                              You want the user to be able to decrypt it (on machine A, or perhaps other machines) with the "correct key"
                              Unfortunately you have made the assumption that the user is the same person, that is not the case. Mike did pick up on that when he asked "What tool is the recipient going to be using to decrypt the string?"

                              The recipient is going to be using PGP. How does that work with Alpha encrypted CSV file?
                              Regards
                              Keith Hubert
                              Alpha Guild Member
                              London.
                              KHDB Management Systems
                              Skype = keith.hubert


                              For your day-to-day Needs, you Need an Alpha Database!

                              Comment

                              Working...
                              X