Jump to content

Encryption


tobeyt23

Recommended Posts

Ok so I was asked to use this to encrypt my data:

 

(first encoding)

HashAlhorithm: SHA512

Passphrase: somepassphrase

Saltvalue: somesaltvalue

PasswordIterations: 42

Initvector: someinitvector


(second encoding)

HashAlhorithm: SHA256

Passphrase: somepassphrase2

Saltvalue: somesaltvalue2

PasswordIterations: 25

Initvector: someinitvector2

 

How would I do this???

Link to comment
https://forums.phpfreaks.com/topic/208423-encryption/
Share on other sites

Okay I have this but still don't know how to use the InitVectorBytes:

 

$iteration1 = '42';
    $iteration2 = '25';

    while(--$iteration1):
        $data = hash('sha512', $data . SALT1. PASSPHRASE1);
    endwhile;

    while(--$iteration2):
        $data = hash('sha256', $data . SALT2. PASSPHRASE2);
    endwhile;

    return $data;

Link to comment
https://forums.phpfreaks.com/topic/208423-encryption/#findComment-1089138
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.