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
  1. Home
  2. General Programming
  3. C#
  4. Common encryption method in PHP and C#

Common encryption method in PHP and C#

Scheduled Pinned Locked Moved C#
csharpphpsecurity
11 Posts 5 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S SimpleData

    Hi I am trying to transfer a data securely over HTTP and my page that I am recieving the secure data from is written in PHP. I need a secure encryption method to encrypt the data that I am sending. It better needs a key to encrypt and decrypt and it should be secure (Rijandel would be nice :) ) Thanks.

    E Offline
    E Offline
    Ennis Ray Lynch Jr
    wrote on last edited by
    #2

    HTTPS would be the best way. However, Google suggests that PHP does support various crypto fucntions so pick one that is also available in .NET.

    Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

    S 1 Reply Last reply
    0
    • E Ennis Ray Lynch Jr

      HTTPS would be the best way. However, Google suggests that PHP does support various crypto fucntions so pick one that is also available in .NET.

      Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

      S Offline
      S Offline
      SimpleData
      wrote on last edited by
      #3

      Thank you for your answer. I have searched a little about it on Google and I have read some articles that I've came across. But none of them give me enough information about how secure is that encryption method is and wheather it exists both on C# and PHP. I need an encryption method which decryptable only with a secret key and exists on both C# and PHP.

      V E 2 Replies Last reply
      0
      • S SimpleData

        Thank you for your answer. I have searched a little about it on Google and I have read some articles that I've came across. But none of them give me enough information about how secure is that encryption method is and wheather it exists both on C# and PHP. I need an encryption method which decryptable only with a secret key and exists on both C# and PHP.

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #4

        http://www.example-code.com/csharp/crypt2_blowfish_matchPhp.asp[^]

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        The woods are lovely, dark and deep, But I have promises to keep, And miles to go before I sleep, And miles to go before I sleep!

        1 Reply Last reply
        0
        • S SimpleData

          Thank you for your answer. I have searched a little about it on Google and I have read some articles that I've came across. But none of them give me enough information about how secure is that encryption method is and wheather it exists both on C# and PHP. I need an encryption method which decryptable only with a secret key and exists on both C# and PHP.

          E Offline
          E Offline
          Ennis Ray Lynch Jr
          wrote on last edited by
          #5

          If you don't have a solid enough foundation in encryption to know the answer you should not be writing code that does encryption, from a security standpoint. It is very easy to make mistakes that can compromise the data. If it is truly important information hire a specialist to come in for one day to do it for you or your company. If the data is not that important just do whatever is simplest and don't worry about it. As for checking whether is exists in both languages. The documentation for both languages provide that answer.

          Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

          S 1 Reply Last reply
          0
          • E Ennis Ray Lynch Jr

            If you don't have a solid enough foundation in encryption to know the answer you should not be writing code that does encryption, from a security standpoint. It is very easy to make mistakes that can compromise the data. If it is truly important information hire a specialist to come in for one day to do it for you or your company. If the data is not that important just do whatever is simplest and don't worry about it. As for checking whether is exists in both languages. The documentation for both languages provide that answer.

            Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

            S Offline
            S Offline
            SimpleData
            wrote on last edited by
            #6

            Thank you for all your answers. As you can see I don't have a solid foundation in encryption, the data I am trying to encrypt is not so vital and sensitive. But it should be encrypted. I can even use Base64 but it would be a little bit too easy I guess. :)

            D 1 Reply Last reply
            0
            • S SimpleData

              Thank you for all your answers. As you can see I don't have a solid foundation in encryption, the data I am trying to encrypt is not so vital and sensitive. But it should be encrypted. I can even use Base64 but it would be a little bit too easy I guess. :)

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #7

              Base64 is not encryption at all. It is an encoding to make sure 8-bit data can safely traverse a 7-bit path.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008

              S 1 Reply Last reply
              0
              • S SimpleData

                Hi I am trying to transfer a data securely over HTTP and my page that I am recieving the secure data from is written in PHP. I need a secure encryption method to encrypt the data that I am sending. It better needs a key to encrypt and decrypt and it should be secure (Rijandel would be nice :) ) Thanks.

                S Offline
                S Offline
                saurabh sahay
                wrote on last edited by
                #8

                Symmetric (Rijndael)[^] would indeed be nice

                S 1 Reply Last reply
                0
                • D Dave Kreskowiak

                  Base64 is not encryption at all. It is an encoding to make sure 8-bit data can safely traverse a 7-bit path.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007, 2008

                  S Offline
                  S Offline
                  saurabh sahay
                  wrote on last edited by
                  #9

                  True

                  1 Reply Last reply
                  0
                  • S saurabh sahay

                    Symmetric (Rijndael)[^] would indeed be nice

                    S Offline
                    S Offline
                    SimpleData
                    wrote on last edited by
                    #10

                    Thank you, but what about PHP?

                    S 1 Reply Last reply
                    0
                    • S SimpleData

                      Thank you, but what about PHP?

                      S Offline
                      S Offline
                      saurabh sahay
                      wrote on last edited by
                      #11

                      Use this PHP package[^]

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

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