Re: Reading first 6 bytes of binary data

2015-06-02 Thread Lars Noodén
On 06/02/2015 01:18 PM, Shlomi Fish wrote: > Hi Lars, > > please reply to all recipients. > > On Tue, 02 Jun 2015 12:54:54 +0300 > Lars Noodén wrote: > >> I have a calculated variable $otp which is decrypted using AES key $key. >> If the variable was properly decrypted, the first six bytes of

Re: Reading first 6 bytes of binary data

2015-06-02 Thread Shlomi Fish
Hi Lars, please reply to all recipients. On Tue, 02 Jun 2015 12:54:54 +0300 Lars Noodén wrote: > I have a calculated variable $otp which is decrypted using AES key $key. > If the variable was properly decrypted, the first six bytes of the > decrypted data should match what is in $userid, I thi

Reading first 6 bytes of binary data

2015-06-02 Thread Lars Noodén
I have a calculated variable $otp which is decrypted using AES key $key. If the variable was properly decrypted, the first six bytes of the decrypted data should match what is in $userid, I think. How do I extract the first six bytes of $plaintext and compare it to what's in $userid ? Regards, L