Results 1 to 7 of 7

Thread: [RESOLVED] Need a really simple encrypt code!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Location
    Sweden
    Posts
    173

    Resolved [RESOLVED] Need a really simple encrypt code!

    Hi everybody!

    I'm after a fast, short and easy code to encrypt/decrypt files.

    The important thing is that the code works fast and works with all files, I don't care if it's not advanced cryptation.

    I'll rate everyone who helps me!

    //Alex
    Please Help Us To Save Ana

    You never fail before you stop trying!
    ______________________________
    If I manage to say something good...please reputate
    ______________________________
    ________

    Links:
    Intellithing
    Digitala.nu
    Norrköpings Goklubb
    WoW Trade Center

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Need a really simple encrypt code!

    From AllAPI.net:

    VB Code:
    1. 'Note: Encryptfile only works on NTFS 5
    2. Private Declare Function EncryptFile Lib "ADVAPI32" Alias "EncryptFileA" (ByVal lpFileName As String) As Boolean
    3. Private Declare Function DecryptFile Lib "ADVAPI32" Alias "DecryptFileA" (ByVal lpFileName As String, ByVal dwReserved As Long) As Boolean
    4. Const mFile = "c:\test.txt"
    5. Private Sub Form_Load()
    6.     'KPD-Team 2000
    7.     'URL: [url]http://www.allapi.net/[/url]
    8.     'E-Mail: [email][email protected][/email]
    9.     Encrypt mFile
    10. End Sub
    11. Sub Encrypt(sFile As String)
    12.     If EncryptFile(mFile) Then
    13.         MsgBox "The file's succesfully encrypted. Log in as another user and try to access this file."
    14.     End If
    15. End Sub
    16. Sub Decrypt(sFile As String)
    17.     If DecryptFile(mFile, 0) = True Then
    18.         MsgBox "The file's succesfully decrypted."
    19.     End If
    20. End Sub

  3. #3
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: Need a really simple encrypt code!

    Hi Alex!
    Here's a fast & strong file & text encryption module

    There's another one Here
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Location
    Sweden
    Posts
    173

    Re: Need a really simple encrypt code!

    gavio: on my computer, nothing happends when I run that code..
    Please Help Us To Save Ana

    You never fail before you stop trying!
    ______________________________
    If I manage to say something good...please reputate
    ______________________________
    ________

    Links:
    Intellithing
    Digitala.nu
    Norrköpings Goklubb
    WoW Trade Center

  5. #5
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: Need a really simple encrypt code!

    Did you try the examples I linked to?
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Location
    Sweden
    Posts
    173

    Re: Need a really simple encrypt code!

    yes, just did. works great!
    tnx shirazamod!
    Please Help Us To Save Ana

    You never fail before you stop trying!
    ______________________________
    If I manage to say something good...please reputate
    ______________________________
    ________

    Links:
    Intellithing
    Digitala.nu
    Norrköpings Goklubb
    WoW Trade Center

  7. #7
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: [RESOLVED] Need a really simple encrypt code!

    My pleasure
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width