Created
April 7, 2016 18:52
-
-
Save rnstux/ad66ec7ad3a560aac9edae069fb207f3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
function sellar($txt){ | |
$llave = " | |
-----BEGIN RSA PRIVATE KEY----- | |
-----END RSA PRIVATE KEY----- | |
"; | |
$private = openssl_pkey_get_private($llave); | |
openssl_sign($txt, $sig, $private); | |
openssl_free_key($private); | |
return base64_encode($sig); | |
} | |
/*Ejemplo de uso */ | |
print sellar("Prueba222"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment