Alexandre
PHPПенсионер
XML Security - приглашаются желающие к тестированию и обсуждению API
Коллеги,
желающие внести вклад в OpenSource и имеющие время приглашаются к тестированию beta версии расширения php_xmlsec
Что это из себя представляет, можно подчерпнуть из презентации http://edocs.phpclub.net/xmlsec/frame.htm или одним файлом http://edocs.phpclub.net/xmlsec.ppt
Сам модуль можно скачать http://edocs.phpclub.net/xmlsec/xmlsec.zip
в директории examples - примеры использования.
Инсталляция - предварительно необходимо установить библиотеку libxmlsec http://aleksey.com/xmlsec/
переписываем директорию xmlsec в ext
далее в директории xmlsec запускаем make
В директории modules скомпилируется so модуль, который можно перенести где находятся все экстеншены и подцепить в php.ini. Лично я конфигурацию не трогаю и загружаю dl.
Особенно приветствуются предложения по созданию API, как удобнее.
Готов ответить на любые вопросы.
-~{}~ 31.08.06 10:42:
новые идеи по API выложены тут http://edocs.phpclub.net/xmlsec/index.htm
если есть предложения - пишите в форум
-~{}~ 12.09.06 11:36:
I see the new view of the php_xmlsec API.
I make the simplification of the API. I exclude the class Template and dive the class XmlSecDoc to two classes
- XmlSecEncryptor()
- XmlSecDSigner()
The xmlsec template will generate by new method ( $doc->generateTemplate or $doc->prepare it is more of like ) or load extern template by method $doc->loadTemplate();
If template will generate by "prepare" method, API will use the ini from constructor:
$doc = new XmlSecEncryprot( array(
'KeyName' => 'Alexandre',
'KeyEncAlgorithm' = 'XMLSEC_OAEM',
'TransformAlgorithm'= 'XMLSEC_c14n',
));
So, You can load any template by $doc->loadTemplate() method;
I think, that the "prepare" method may be private and we have the rule: if don't call the "TemplateLoad" method before call the "encrypt" method, we call the "prepere" method.
The next example new API:
The the XmlDSigner class is analog hte XmlSecEncryptor class.
-~{}~ 20.10.06 10:43:
Внимание!
Выложена новая версия библиотеки.
Большое спасибо, тем кто принял в тестировании. Все замечания учтены.
Коллеги,
желающие внести вклад в OpenSource и имеющие время приглашаются к тестированию beta версии расширения php_xmlsec
Что это из себя представляет, можно подчерпнуть из презентации http://edocs.phpclub.net/xmlsec/frame.htm или одним файлом http://edocs.phpclub.net/xmlsec.ppt
Сам модуль можно скачать http://edocs.phpclub.net/xmlsec/xmlsec.zip
в директории examples - примеры использования.
Инсталляция - предварительно необходимо установить библиотеку libxmlsec http://aleksey.com/xmlsec/
переписываем директорию xmlsec в ext
далее в директории xmlsec запускаем make
В директории modules скомпилируется so модуль, который можно перенести где находятся все экстеншены и подцепить в php.ini. Лично я конфигурацию не трогаю и загружаю dl.
Особенно приветствуются предложения по созданию API, как удобнее.
Готов ответить на любые вопросы.
-~{}~ 31.08.06 10:42:
новые идеи по API выложены тут http://edocs.phpclub.net/xmlsec/index.htm
если есть предложения - пишите в форум
-~{}~ 12.09.06 11:36:
I see the new view of the php_xmlsec API.
I make the simplification of the API. I exclude the class Template and dive the class XmlSecDoc to two classes
- XmlSecEncryptor()
- XmlSecDSigner()
The xmlsec template will generate by new method ( $doc->generateTemplate or $doc->prepare it is more of like ) or load extern template by method $doc->loadTemplate();
If template will generate by "prepare" method, API will use the ini from constructor:
$doc = new XmlSecEncryprot( array(
'KeyName' => 'Alexandre',
'KeyEncAlgorithm' = 'XMLSEC_OAEM',
'TransformAlgorithm'= 'XMLSEC_c14n',
));
So, You can load any template by $doc->loadTemplate() method;
I think, that the "prepare" method may be private and we have the rule: if don't call the "TemplateLoad" method before call the "encrypt" method, we call the "prepere" method.
The next example new API:
PHP:
// create Encryptor class
$xmlSecIni = array(
'KeyName' => 'Alexandre',
'KeyEncAlgorithm' = 'XMLSEC_OAEM',
'TransformAlgorithm'= 'XMLSEC_c14n',
);
$doc = new XmlSecEncryptor($xmlSecIni);
// loading
$doc->load( $xml_string ); // or $doc->loadTemplate($tpl) - is optional
// set Key - The XmlSecKey class from old API without change.
$doc->setKey($key);
if ( $doc->encrypt)
print $doc->save();
else
print XmlSec->getError();
// Decryption:
$doc = new XmlSecEncryptor();
$doc->setKey($key);
if ( $doc->decrypt)
print $doc->save();
else
print XmlSec->getError();
-~{}~ 20.10.06 10:43:
Внимание!
Выложена новая версия библиотеки.
Большое спасибо, тем кто принял в тестировании. Все замечания учтены.