GPLVote::SignDoc::Client - module for helping create GPLVote SignDoc client software.
use GPLVote::SignDoc::Client; if (user_sign_is_valid($public_key, $sign, $data)) { print "Sign of document is CORRECT\n"; } else { print "BAD SIGN!!!\n"; }; my $pub_key_id = calc_pub_key_id($public_key); my $enc_data = encrypt($public_key, $data);
Check signature of data.
public_key - RSA public key for check signature. Encoded in Base64 in one string without special begin/finish strings and without line breaks.
sign - RSA signature. Some format like public_key.
data - signing data for verify signature.
sha256sign - boolean flag for check signature as "SHA256withRSA", else checking as "SHA1withRSA".
Returning true if signature is valid.
Helping method for separate one long line Base64 on different lines with length 72 chars.
Calculate ID of public key.
Encrypt data over public key.
Returning plain Base64 string with encrypted data.
No known bugs, but this does not mean no bugs exist.
http://gplvote.org/
Andrey Velikoredchanin <andy@andyhost.ru>
Andrey Velikoredchanin
GPLVote::SignDoc::Client - module for helping create GPLVote SignDoc client software Copyright (c) 2014, Andrey Velikoredchanin.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
BECAUSE THIS LIBRARY IS LICENSED FREE OF CHARGE, THIS LIBRARY IS BEING PROVIDED "AS IS WITH ALL FAULTS," WITHOUT ANY WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF TITLE, NONINFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, AND THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS WITH THE YOU. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
To install GPLVote::SignDoc::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GPLVote::SignDoc::Client
CPAN shell
perl -MCPAN -e shell install GPLVote::SignDoc::Client
For more information on module installation, please visit the detailed CPAN module installation guide.