Created
August 25, 2014 14:27
-
-
Save trianglman/57d21e274bd3e7e987f9 to your computer and use it in GitHub Desktop.
extension snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef unsigned char ed25519_public_key[32]; | |
typedef unsigned char ed25519_secret_key[32]; | |
ZEND_FUNCTION(ec_generate_pk) | |
{ | |
ed25519_secret_key sk; | |
int skLen; | |
int curveType = 1;//EC_ED25519 | |
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &sk, &skLen, &curveType) == FAILURE) { | |
RETURN_NULL(); | |
} | |
ed25519_public_key pk; | |
ed25519_publickey(sk,pk); | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment