Crypt-FNA
view release on metacpan or search on metacpan
lib/Crypt/FNA.pm view on Meta::CPAN
values ranging from 0 to 255.
Default value: (255,255,255)
=head2 ATTRIBUTE foreground
And 'the RGB color tract in the PNG file containing the design curve. The notation is decimal, then
with values ranging from 0 to 255.
Default value: (0,0,0)
=head2 ATTRIBUTE magic
Indicates the number of vertices of the curve to be skipped during encryption and decryption: Since the algorithm, a
continuous function on the top, skipping some, this is still on top of all the isolated points
(Hence "fair").
Default value: 3
=head2 ATTRIBUTE salted
The "salted" attribute, a boolean, instructs the class
to use a cryptographic salt, so that multiple encryption
the same data will, in general, different cryptogram.
Default value: false (for backward compatibility with previous versions of FNA)
=head1 METHODS
=head2 new
See CONSTRUCTOR METHOD
=head2 encrypt_file
encrypt_file decrypt_file method and are the sum: make it useful by applying the mathematical
curves (F). This method carries out a very precise: it encrypt the input file to output file.
The syntax is:
$krypto->encrypt_file($name_plain_file, $name_encrypted_file)
The input file of any format will be encrypt by the curve (F).
=head2 decrypt_file
The methods and decrypt_file encrypt_file, are summa: make it useful by applying the mathematical
curves (F). This method carries out a very precise: it decrypt the input file (which is to
encrypt_file output method) in the output file (which is the input method encrypt_file).
The syntax is:
$krypto->decrypt_file($name_encrypted_file, $name_decrypted_file)
The input file is read and decoded through the curve (F), the output file.
=head2 encrypt_scalar
The method encrypt_scalar digit strings: the result of encryption is a vector containing the cryptogram.
The syntax is:
my @encrypted_scalar=$krypto->encrypt_scalar($this_scalar)
See examples
=head2 decrypt_scalar
The method decrypt_scalar make a plain string from the encrypted array returned from encrypt_scalar method: the result of decryption is a scalar containing plain value.
The syntax is:
@decrypted_scalar=$krypto->decrypt_scalar(@encrypted_scalar)
=head2 mac
The MAC method, computes the digital signature of a file (FNA work how a digest algoritm). The signature is represented by the coordinates of the last vertex of the curve {F} used.
The syntax is:
my $mac=$krypto->mac($name_plain_file)
The input file of any format will be encrypt by the curve (F).
=head2 make_fract
This method is undoubtedly the most impressive and allows you to "touch" the curves that will be applied in cryptographic algorithms.
For the programmer can be useful in your application, show the curve, for example, a hypothetical control panel for managing passwords or
encrypted files in an attachment to forms sent by email and stored on the server.
The graphic file output format is PNG (Portable Network Graphic), accessible from any browser by as many different graphics software.
The syntax is:
$krypto->make_fract($pngfile, $zoom)
1. $pngfile is the name of the png files - without extension "PNG" is inserted automatically
2. $zoom the drawing scale - greater than zero. Default value: 1
The image produced is contained in the square of side $square.
=head1 EXAMPLES
=head2 making FNA object
my $krypto=Crypt::FNA->new(
{
( run in 0.814 second using v1.01-cache-2.11-cpan-2398b32b56e )