CTK::Plugin::Crypt - Cryptography plugin
Version 1.00
use CTK; my $ctk = new CTK( plugins => "crypt", ); my $gpg_instance = $ctk->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"); $ctk->gpg_encrypt( -infile => "MyDocument.txt", -outfile=> "MyDocument.txt.asc", -armor => "yes", ) or die( $self->error ); $ctk->gpg_decrypt( -infile => "MyDocument.txt.asc", -outfile=> "MyDocument.txt", ) or die( $self->error ); $ctk->tcd_encrypt( "file.txt", "file.tcd" ) or die( $self->error ); $ctk->tcd_decrypt( "file.tcd", "file.txt" ) or die( $self->error );
Cryptography plugin
See http://www.gnupg.org (GPG4Win - http://gpg4win.org) for details
my $gpg_instance = $ctk->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. NOTE! It is GLOBAL object!
For using self object please use CTK::Crypt::GPG module
See CTK::Crypt::GPG
$ctk->gpg_decrypt( -infile => "MyDocument.txt.asc", -outfile=> "MyDocument.txt", ) or die( $self->error );
GPG (PGP) Decrypting the files
$ctk->gpg_encrypt( -infile => "MyDocument.txt", -outfile=> "MyDocument.txt.asc", -armor => "yes", ) or die( $self->error );
GPG (PGP) Encrypting the files
TCD04 Decrypting the files
See CTK::Crypt::TCD04
$ctk->tcd_encrypt( "file.txt", "file.tcd" ) or die( $self->error );
TCD04 Encrypting the files
See Changes file
Changes
CTK, CTK::Plugin, CTK::Crypt
See TODO file
TODO
* none noted
CTK, CTK::Plugin, CTK::Crypt, http://www.gnupg.org, GPG4Win
Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2019 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.