Blob Blame History Raw
Summary:	Hashes (and objects based on hashes) with encrypting fields
Name:		perl-Tie-EncryptedHash
Version:	1.24
Release:	1%{?dist}
License:	GPL+ or Artistic
Group:		Development/Libraries
Url:		http://search.cpan.org/dist/Tie-EncryptedHash/
Source0:	http://search.cpan.org/CPAN/authors/id/V/VI/VIPUL/Tie-EncryptedHash-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch:	noarch
BuildRequires:	perl(Crypt::CBC)
BuildRequires:	perl(Crypt::Blowfish)
BuildRequires:	perl(Crypt::DES)
BuildRequires:	perl(ExtUtils::MakeMaker)

%description
Tie::EncryptedHash augments Perl hash semantics to build secure, encrypting
containers of data. Tie::EncryptedHash introduces special hash fields that are
coupled with encrypt/decrypt routines to encrypt assignments at STORE() and
decrypt retrievals at FETCH(). By design, encrypting fields are associated with
keys that begin in single underscore. The remaining keyspace is used for
accessing normal hash fields, which are retained without modification.

While the password is set, a Tie::EncryptedHash behaves exactly like a standard
Perl hash. This is its transparent mode of access. Encrypting and normal fields
are identical in this mode. When password is deleted, encrypting fields are
accessible only as ciphertext. This is Tie::EncryptedHash's opaque mode of
access, optimized for serialization.

Encryption is done with Crypt::CBC(3), which encrypts in the cipher block
chaining mode with Blowfish, DES or IDEA. Tie::EncryptedHash uses Blowfish by
default, but can be instructed to employ any cipher supported by Crypt::CBC(3).

%prep
%setup -q -n Tie-EncryptedHash-%{version}
%{__sed} -i -e '/^#! *\/usr\/bin\/perl /d' lib/Tie/EncryptedHash.pm

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%{__rm} -rf %{buildroot}
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} 2>/dev/null ';'
%{__chmod} -R u+w %{buildroot}/*

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes LICENSE README.html TODO
%{perl_vendorlib}/Tie/
%{_mandir}/man3/Tie::EncryptedHash.3pm*

%changelog
* Tue Jul 15 2008 Paul Howarth <paul@city-fan.org> 1.24-1
- Update to 1.24 (upstream has clarified the license - see
  http://rt.cpan.org/Ticket/Display.html?id=28813)
- Include LICENSE file as %%doc

* Tue Jul 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.23-1
- update to 1.23
- license changed to GPL+ or Artistic

* Wed Mar  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.21-4
- rebuild for new perl

* Wed Apr 18 2007 Paul Howarth <paul@city-fan.org> 1.21-3
- Buildrequire perl(ExtUtils::MakeMaker)
- Fix argument order for find with -depth

* Wed Aug 30 2006 Paul Howarth <paul@city-fan.org> 1.21-2
- FE6 mass rebuild

* Tue Dec  6 2005 Paul Howarth <paul@city-fan.org> 1.21-1
- Initial build