pairing.pod
来自「PBC perl 接口程序, Pair-Based cryption」· POD 代码 · 共 40 行
POD
40 行
=head1 NAMECrypt::PBC::Pairing - OO interface for the Stanford PBC library=head1 SYNOPSIS use Crypt::PBC; my $pairing = new Crypt::PBC("params_d.txt"); my $G1 = $pairing->init_G1->random; my $G2 = $pairing->init_G2->random->double->square; my $GT = $pairing->init_GT->pairing_apply( $G1, $G2 );=head1 Initializer FunctionsThe only thing of use this package does is initialize elements in the pairing.It does many other things behind the scenes though. my $G1_element = $pairing->init_G1; # returns Crypt::PBC::Element my $G2_element = $pairing->init_G2; # objects my $GT_element = $pairing->init_GT; my $Zr_element = $pairing->init_Zr;The most important thing the Pairing package does is handle memory for you.The package is a scalar ref of the C-pointer. C<$$pairing> is the "address" asan integer!It's important when clearing the PBC memory that pairings get cleared afterelements and the Element and Pairing objects handle that on their own. You maysafely ignore clearing elements and pairings if you use the OO interface.Although, be sure that if you overload C<DESTROY> that you callC<SUPER::DESTROY()>!=head1 AUTHOR AND LICENSINGGPL-ish and the XS author is Paul Miller C<jettero@cpan.org>.Please see Crypt::PBC(3) for further information.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?