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
const pkcs11js = require("pkcs11js"); | |
/** | |
* 1 - Carregando a lib que dara suporte as operacoes com PKCS11 | |
*/ | |
const pkcs11 = new pkcs11js.PKCS11(); | |
pkcs11.load("/usr/local/lib/softhsm/libsofthsm2.so"); | |
pkcs11.C_Initialize(); | |
const moduleInfo = pkcs11.C_GetInfo(); | |
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
public function v4() | |
{ | |
return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', | |
// 32 bits for "time_low" | |
mt_rand(0, 0xffff), mt_rand(0, 0xffff), | |
// 16 bits for "time_mid" | |
mt_rand(0, 0xffff), |
NewerOlder