CTK::Crypt - Cryptography frontend module
Version 1.73
use CTK::Util qw/gpg_init gpg_encrypt gpg_decrypt/; my $gpg_instance = gpg_init( -gpgbin => "/usr/bin/gpg", -gpghome => "/gpg/homedir", -gpgconf => "/gpg/homedir/gpg.conf", -gpgopts => ["verbose", "yes"], -publickey => "/path/to/public.key", -privatekey => "/path/to/private.key", -password => "passphrase", # Key password -recipient => "anonymous@example.com", # Email, user id, keyid, or keygrip ) or die("Can't create crypter"); gpg_encrypt( -infile => "MyDocument.txt", -outfile=> "MyDocument.txt.asc", -armor => "yes", ) or die( $CTK::Crypt::ERROR ); gpg_decrypt( -infile => "MyDocument.txt.asc", -outfile=> "MyDocument.txt", ) or die( $CTK::Crypt::ERROR ); tcd_encrypt( "file.txt", "file.tcd" ) or die( $CTK::Crypt::ERROR ); tcd_decrypt( "file.tcd", "file.txt" ) or die( $CTK::Crypt::ERROR );
Cryptography frontend module
my $gpg_instance = gpg_init( -gpgbin => "/usr/bin/gpg", -gpghome => "/gpg/homedir", -gpgconf => "/gpg/homedir/gpg.conf", -gpgopts => ["verbose", "yes"], -publickey => "/path/to/public.key", -privatekey => "/path/to/private.key", -password => "passphrase", # Key password -recipient => "anonymous@example.com", # Email, user id, keyid, or keygrip ) or die("Can't create crypter");
Initialize GPG instance
See CTK::Crypt::GPG
$gpg_instance->decrypt( -infile => "MyDocument.txt.asc", -outfile=> "MyDocument.txt", ) or die( $CTK::Crypt::ERROR );
GPG (PGP) Decrypting the files
$gpg_instance->encrypt( -infile => "MyDocument.txt", -outfile=> "MyDocument.txt.asc", -armor => "yes", ) or die( $CTK::Crypt::ERROR );
GPG (PGP) Encrypting the files
tcd_decrypt( "file.tcd", "file.txt" ) or die( $CTK::Crypt::ERROR );
TCD04 Decrypting files
tcd_encrypt( "file.txt", "file.tcd" ) or die( $CTK::Crypt::ERROR );
TCD04 Encrypting files
Will be exported all functions
Will be exported following functions:
tcd_encrypt, tcd_decrypt
gpg_init, gpg_encrypt, gpg_decrypt
See Changes file
Changes
CTK::Crypt::GPG, CTK::Crypt::TCD04
See TODO file
TODO
* none noted
Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE file and https://dev.perl.org/licenses/
LICENSE
To install CTK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CTK
CPAN shell
perl -MCPAN -e shell install CTK
For more information on module installation, please visit the detailed CPAN module installation guide.