1 package org.apache.turbine.services.crypto;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import java.security.NoSuchAlgorithmException;
20
21 import org.apache.turbine.services.Service;
22
23 /***
24 * The Crypto Service manages the availability of various crypto
25 * sources. It provides a consistent interface to things like the
26 * various java.security Message Digest stuff or the Unix Crypt
27 * algorithm.
28 *
29 * It contains no actual crypto code so it should be fine to import/export
30 * everywhere.
31 *
32 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
33 * @version $Id: CryptoService.java 264148 2005-08-29 14:21:04Z henning $
34 */
35 public interface CryptoService
36 extends Service
37 {
38 /*** The name of the service */
39 String SERVICE_NAME = "CryptoService";
40
41 /***
42 * Returns a CryptoAlgorithm Object which represents the requested
43 * crypto algorithm.
44 *
45 * @param algorithm Name of the requested algorithm
46 * @return An Object representing the algorithm
47 * @throws NoSuchAlgorithmException Requested algorithm is not available
48 */
49 CryptoAlgorithm getCryptoAlgorithm(String algorithm)
50 throws NoSuchAlgorithmException;
51 }