Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

TechnoDev

@TechnoDev
About
Posts
9
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Database not updating after using insert on submit with linq.
    T TechnoDev

    Hi Folks I have this basic code. Dim db As New MyLinqDataContext Dim o As New Order o.OrderName = "Cool Order" db.Orders.InsertOnSubmit(o) db.SubmitChanges() db.Connection.Close() (I originally have tried this on C#) I have an orderid column which serves as a primary key which should update automatically when i insert the record. When the code runs there is no record but the database is not updated. Anyone else having issues with this. Im using the express versions of visual studio 2008. thx in advance.

    Visual Basic csharp database visual-studio linq announcement

  • How smart is your management
    T TechnoDev

    are u being sarcastic or truthful

    The Lounge question

  • Am I the only one that actually *LIKES* Vista?
    T TechnoDev

    In the beginning Vista was really tough, especially on the compatibility area in my opinion but they seem to be doing an ok job with all the patches they have release. Im running ultimate edition with little problems

    The Lounge design linux help tutorial question

  • How smart is your management
    T TechnoDev

    And what do you do when your management chooses not to listen to you. and you question your appreciation in your company?

    The Lounge question

  • Do most developers prefer to work alone or on a team
    T TechnoDev

    this may be somewhat of a silly question but what do you folks think about it.

    The Lounge collaboration question

  • Is Biztalk the most lucrative skill out there?
    T TechnoDev

    The reason I ask this question is because pretty much anyone who is using this tech at the senior level is in the six figure range. What is your opinion on this and also I hear that sharepoint is lucrative also..whats everyones take on this?Thanks

    The Lounge question sharepoint

  • Is it possible to store an encrypted files other than .txt in sql server using AES encryption(C#).
    T TechnoDev

    IS this at all possible? thanks

    C# csharp database sql-server sysadmin security

  • Is it possible to store an encrypted txt file in sql server using AES encryption.
    T TechnoDev

    Also can you decrypt the content from the database and recreate the file? thanks in advance.

    C# database sql-server sysadmin security question

  • Storing AES encrypted files in SQL Server and retrieving these files to decrypt them
    T TechnoDev

    Hi folks, Ive been working on a little app that lets u choose a file from your PC and encrypts it using AES encryption(Rijndael). The encrypted bytes are stored in Sql Server. I wanted to be able to retrieve the encrypted bytes so I can decrypt them. The process works fine. However when i open the decrypted file I have a ton of gibberish looking characters appended file but the decrypted text is fine. For example, this is what the decrypted text looks like. testing today Õ/þ°A¦ðI.Dº9­9ï_qýÆ;ßfÞàV¥u> øï_qýÆ;ßfÞàV¥u> øï_qýÆ;ßfÞàV¥u> øï_qýÆ;ßfÞàV¥u> øï_qýÆ;ßfÞàV¥u> øï_qýÆ;ßfÞàV¥u> øï_qýÆ;ßfÞàV¥u> ...... it continues on for a while. Can my goals even be achieved with this method? I have heard there are issues with doing this due to how SQLServer stores binary and padding issues with AES. Here is the code. public string EncryptFileData(string filename) { FileStream fsIn = new FileStream(filename, FileMode.Open, FileAccess.Read); byte[] buffer = new byte[4096]; int bytesRead = fsIn.Read(buffer, 0, buffer.Length); MemoryStream ms = new MemoryStream(); Rijndael alg = Rijndael.Create(); alg.Padding = PaddingMode.None; PasswordDeriveBytes pdb = new PasswordDeriveBytes(@"test", new byte[] {0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76}); alg.Key = pdb.GetBytes(32); alg.IV = pdb.GetBytes(16); try { CryptoStream cs = new CryptoStream(ms, alg.CreateEncryptor(), CryptoStreamMode.Write); cs.Write(buffer, 0, buffer.Length); cs.Close(); byte[] encData = ms.ToArray(); SqlConnection conn = new SqlConnection(Settings1.Default.Properties["str"].DefaultValue.ToString()); conn.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "spStoreFileContent"; cmd.Parameters.AddWithValue("@FileName", @"c:\test\test.aop"); cmd.Parameters.AddWithValue("@EFileContent", encData); cmd.ExecuteNonQuery(); conn.Close(); return "Cool Beans"; } catch (SystemException sx)

    C# database sql-server sysadmin security testing
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups