Encrypt and Decrypt with openssl

Results 1 to 5 of 5
  1. #1
    Registered Noobs is offline
    MemberRank
    Jan 2017 Join Date
    SingaporeLocation
    12Posts

    idea Encrypt and Decrypt with openssl


    RaGEZONE Recommends

    RaGEZONE Recommends

    hi guys,

    i made Encrypt and Decrypt function as follow:
    NOTE: can't post php code here, i have made it at this link: https://3v4l.org/Qlkqg

    How i can get the correct Decrypted result?

    Thank you for your help :)


  2. #2
    what a twat is this hat? saamus is offline
    Alpha MaleRank
    Sep 2011 Join Date
    /etc/rc.localLocation
    2,212Posts

    Re: Encrypt and Decrypt with openssl

    Fixed it for you. https://3v4l.org/th9Jm

    Why you was using open SSL random bytes as initializing vector? That would not work. I removed your base64 and trim/strstr only by test. But would work with they added too.

    You need understand that you need do a padding manipulation of the decrypted result because of your random initializing vector. First at all you need save in some place the output of openssl_random_bytes in order to see a specific byte combination.

    php - Use of Initialization Vector in openssl_encrypt - Stack Overflow More explanation here.

  3. #3
    Registered Noobs is offline
    MemberRank
    Jan 2017 Join Date
    SingaporeLocation
    12Posts

    Re: Encrypt and Decrypt with openssl

    thank you.

    i just trying experiment. got home work from my campus

  4. #4
    what a twat is this hat? saamus is offline
    Alpha MaleRank
    Sep 2011 Join Date
    /etc/rc.localLocation
    2,212Posts

    Re: Encrypt and Decrypt with openssl

    Quote Originally Posted by Noobs View Post
    thank you.

    i just trying experiment. got home work from my campus
    I see. No probs :)

    If I can help you in something else, just say.

  5. #5
    Registered Noobs is offline
    MemberRank
    Jan 2017 Join Date
    SingaporeLocation
    12Posts

    Re: Encrypt and Decrypt with openssl

    Quote Originally Posted by saamus View Post
    I see. No probs :)
    If I can help you in something else, just say.
    thank you for your help
    Last edited by Noobs; 29-04-17 at 06:52 AM.
    Don't forget to add my Skype: vyra.ghozali




Advertisement