Implemented locking for AES stream, although it can now take up to three times longer to write with locking. (Doesn't matter much though since it's in microseconds)