line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# GnuPG/Tie/Decrypt.pm - Tied file handle interface to the decryption |
3
|
|
|
|
|
|
|
# functionality of GnuPG. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# This file is part of GnuPG.pm. |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# Author: Francis J. Lacoste <francis.lacoste@Contre.COM> |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Copyright (C) 1999, 2000 iNsu Innovations Inc. |
10
|
|
|
|
|
|
|
# Copyright (C) 2001 Francis J. Lacoste |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify |
13
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by |
14
|
|
|
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or |
15
|
|
|
|
|
|
|
# (at your option) any later version. |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful, |
18
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
19
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20
|
|
|
|
|
|
|
# GNU General Public License for more details. |
21
|
|
|
|
|
|
|
# |
22
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License |
23
|
|
|
|
|
|
|
# along with this program; if not, write to the Free Software |
24
|
|
|
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
25
|
|
|
|
|
|
|
# |
26
|
|
|
|
|
|
|
package GnuPG::Tie::Decrypt; |
27
|
|
|
|
|
|
|
|
28
|
28
|
|
|
28
|
|
11844
|
use GnuPG; |
|
28
|
|
|
|
|
56
|
|
|
28
|
|
|
|
|
1092
|
|
29
|
28
|
|
|
28
|
|
140
|
use GnuPG::Tie; |
|
28
|
|
|
|
|
56
|
|
|
28
|
|
|
|
|
532
|
|
30
|
|
|
|
|
|
|
|
31
|
28
|
|
|
28
|
|
140
|
use vars qw( @ISA ); |
|
28
|
|
|
|
|
28
|
|
|
28
|
|
|
|
|
1092
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
BEGIN { |
34
|
28
|
|
|
28
|
|
3556
|
@ISA = qw( GnuPG::Tie ); |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub run_gnupg { |
38
|
8
|
|
|
8
|
0
|
26
|
my $self = shift; |
39
|
|
|
|
|
|
|
|
40
|
8
|
|
|
|
|
47
|
$self->{last_sig} = undef; |
41
|
8
|
|
|
|
|
43
|
$self->{args} = [ @_ ]; |
42
|
8
|
|
|
|
|
60
|
$self->{gnupg}->decrypt( @_ ); |
43
|
|
|
|
|
|
|
}; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub postread_hook { |
46
|
6
|
|
|
6
|
0
|
22
|
my $self = shift; |
47
|
|
|
|
|
|
|
|
48
|
6
|
|
|
|
|
24
|
$self->{gnupg}->decrypt_postread( @{$self->{args}} ); |
|
6
|
|
|
|
|
104
|
|
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub postwrite_hook { |
52
|
6
|
|
|
6
|
0
|
28
|
my $self = shift; |
53
|
|
|
|
|
|
|
|
54
|
6
|
|
|
|
|
16
|
$self->{last_sig} = $self->{gnupg}->decrypt_postwrite( @{$self->{args}} ); |
|
6
|
|
|
|
|
38
|
|
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub signature { |
58
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
return $self->{last_sig}; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
64
|
|
|
|
|
|
|
|