Skip to content
Advertisement

Tag: c#

How can I get PHP to sign an input exactly the same as C#?

I’m working with an older API that requires XMLs to be signed. There is no proper documentation and the only code example was given in C#. I need to port this example to PHP. However, the code I’ve written in PHP gets a different output even when provided with the same input, causing the API call to fail. I’ve narrowed

php-ffi: Assign char* of a struct

I’m trying to set the value of a char* of a struct. This is a basic example: I’m getting an exception: FFIException: Incompatible types when assigning to type ‘char*’ from PHP ‘string’ My question is: How to set the char *name of a struct? My dirty way was to make an array of chars, str_split the string and set the

No reaction to website login with Selenium

I can login to the PHP website https://panel-support.oasgames.com/panel/ajaxrela/login manually, which will show a bird animation and on failed login show “Failed to login” on the website, whereas on successful login it will redirect to the main page. Login happens via POST, which returns JSON. But when I use the following executable snippet and login in the automated Chrome window (manually

Fastest reimplementation PHP’s htmlspecialchars function in C

I need the default behaviour (i.e ENT_COMPAT | ENT_HTML401) of the PHP-function htmlspecialchars() in C, how is this done best (that means fastest) in C? I don’t need the input string, therefore an in-place solution is possible. It is a really simple function, it just converts these characters: What strategy would be fastest? Looping over each character individually and creating

looking for c# equivalent of php’s password-verify()

I need to import a bunch of user accounts Moodle into a system written in c#. Moodle uses password_hash() function to create hashes of passwords. I need to be able to verify these passwords in c#. In other words I looking for a c# implementation of PHP’s password verify function ( http://www.php.net/manual/en/function.password-verify.php ). I’ve googled a bit but couldn’t really

Advertisement