Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / mcrypt.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages mcrypt)
20 #:use-module (guix packages)
21 #:use-module ((guix licenses) #:select (gpl2+))
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages compression)
26 #:use-module (gnu packages perl))
27
28 (define-public mcrypt
29 (package
30 (name "mcrypt")
31 (version "2.6.8")
32 (source
33 (origin
34 (method url-fetch)
35 (uri (string-append "mirror://sourceforge/mcrypt/mcrypt-"
36 version ".tar.gz"))
37 (sha256
38 (base32
39 "161031n1w9pb4yzz9i47szc12a4mwpcpvyxnvafsik2l9s2aliai"))))
40 (build-system gnu-build-system)
41 (inputs
42 `(("zlib" ,zlib)
43 ("libmcrypt" ,libmcrypt)
44 ("libmhash" ,libmhash)))
45 (home-page "http://mcrypt.sourceforge.net/")
46 (synopsis "Replacement for the popular Unix crypt command")
47 (description
48 "MCrypt is a replacement for the old crypt() package and crypt(1)
49 command, with extensions. It allows developers to use a wide range of
50 encryption functions, without making drastic changes to their code. It allows
51 users to encrypt files or data streams without having to be cryptographers.
52 The companion to MCrypt is Libmcrypt, which contains the actual encryption
53 functions themselves, and provides a standardized mechanism for accessing
54 them.")
55 (license gpl2+)))
56
57 (define-public libmcrypt
58 (package
59 (name "libmcrypt")
60 (version "2.5.8")
61 (source
62 (origin
63 (method url-fetch)
64 (uri (string-append "mirror://sourceforge/mcrypt/libmcrypt-"
65 version ".tar.gz"))
66 (sha256
67 (base32
68 "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"))))
69 (build-system gnu-build-system)
70 (home-page "http://mcrypt.sourceforge.net/")
71 (synopsis "Encryption algorithm library")
72 (description
73 "Libmcrypt is a data encryption library. The library is thread safe and
74 provides encryption and decryption functions. This version of the library
75 supports many encryption algorithms and encryption modes. Some algorithms
76 which are supported: SERPENT, RIJNDAEL, 3DES, GOST, SAFER+, CAST-256, RC2,
77 XTEA, 3WAY, TWOFISH, BLOWFISH, ARCFOUR, WAKE and more.")
78 (license gpl2+)))
79
80 (define-public libmhash
81 (package
82 (name "libmhash")
83 (version "0.9.9.9")
84 (source
85 (origin
86 (method url-fetch)
87
88 (uri (string-append "mirror://sourceforge/mhash/mhash-"
89 version ".tar.bz2"))
90 (sha256
91 (base32
92 "1w7yiljan8gf1ibiypi6hm3r363imm3sxl1j8hapjdq3m591qljn"))
93 (patches (search-patches "mhash-keygen-test-segfault.patch"))))
94 (build-system gnu-build-system)
95 (native-inputs
96 `(("perl" ,perl))) ;for tests
97 (home-page "http://mhash.sourceforge.net/")
98 (synopsis "Thread-safe hash library")
99 (description
100 "Mhash is a thread-safe hash library, implemented in C, and provides a
101 uniform interface to a large number of hash algorithms. These algorithms can
102 be used to compute checksums, message digests, and other signatures. The HMAC
103 support implements the basics for message authentication, following RFC 2104.
104
105 Algorithms currently supplied are:
106
107 CRC-32, CRC-32B, ALDER-32, MD-2, MD-4, MD-5, RIPEMD-128, RIPEMD-160,
108 RIPEMD-256, RIPEMD-320, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, HAVAL-128,
109 HAVAL-160, HAVAL-192, HAVAL-256, TIGER, TIGER-128, TIGER-160, GOST, WHIRLPOOL,
110 SNEFRU-128, SNEFRU-256.")
111 (license gpl2+)))