Profile cover photo
Profile photo
Chris Zuber
160 followers -
It's better to be hated for what you are than to be loved for something you're not.
It's better to be hated for what you are than to be loved for something you're not.

160 followers
About
Chris's posts

Post has attachment
I don't get it
Photo

Post has attachment
Question: How secure is it to store the initialization vector & cipher method with the output of `openssl_encrypt`?

I'm wanting to simplify use of `openssl_decrypt` by storing non-sensitive data in the format "$cipher:$algo:$iv:$options:$encrypted_data" so that the decrypt method only needs the password.

If storing the IV in the text is not secure, is it less secure than reusing the same one all the time?

Full code in PHP7, along with documentation and links to openssl_* functions.

Post has attachment
RSA public key cryptography using PHP >= 7

Post has attachment
I didn't see much of the inauguration. I feel that this is close enough.

Post has attachment
Something pretty significant I've been working on for a few months now. Took a break from this for a while and now I'm back working on it.

In short, I'm trying to implement form validation server-side the same way it's done client side. Teaching PHP how to handle different input types [email, datetime-local, etc.] as well as min/max/pattern/required attributes.

Working with datetime inputs was a bit of a pain to get right. I could have done a strict pattern test "YYYY-MM-DDTHH:MM:SS", but I wanted for it to also work with "Jan. 13, 8:57 pm" to make it usable by non-developers. These inputs are converted into the correct format by DateTime class.

Checking the step attribute on floats/decimals was a bit of a pain as well. Can't just use "fmod($value, $step) === 0.0".

It requires that the form not be altered by the client (validates against HTML or DOMElement on server), so it won't work if new inputs are added or attributes are changed by JavaScript.

Still a WIP. Have not yet handled files, which is a pretty important aspect. Also does not yet handle more complicated forms (<input name="field[...]">) or the multiple attribute. Only checks <input>s right now, but <select> and <textarea> shouldn't be difficult to add.

shgysk8zer0/domvalidator: Validate forms in PHP using DOM attributes

Post has attachment
Fire damage plus soil dry from drought plus rain =
Photo

Post has attachment
Winter weather advisory for Kern county. I think we have maybe 3 inches so far (picture is a few hours old as of posting).
Photo

Post has attachment
This is what we count as a white Christmas here.
Photo

Post has attachment
I guess Kim Kardashian's getting into the SEO business
Photo

Post has attachment
Bieber Fever has eliminated all life!
Photo
Wait while more posts are being loaded