KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > crypto > interfaces > PBEKey


1 /*
2  * @(#)PBEKey.java 1.6 04/01/14
3  *
4  * Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7   
8 /*
9  * NOTE:
10  * Because of various external restrictions (i.e. US export
11  * regulations, etc.), the actual source code can not be provided
12  * at this time. This file represents the skeleton of the source
13  * file, so that javadocs of the API can be created.
14  */

15
16 package javax.crypto.interfaces;
17
18 import java.math.BigInteger;
19
20 /**
21  * The interface to a PBE key.
22  *
23  * @author Valerie Peng
24  *
25  * @version 1.7, 01/14/04
26  *
27  * @see javax.crypto.spec.PBEKeySpec
28  * @see javax.crypto.SecretKey
29  * @since 1.4
30  */

31 public interface PBEKey extends javax.crypto.SecretKey
32 {
33     /**
34      * The class fingerprint that is set to indicate serialization
35      * compatibility since J2SE 1.4.
36      */

37     public static final long serialVersionUID = -1430015993304333921L;
38
39     /**
40      * Returns the password.
41      *
42      * <p> Note: this method should return a copy of the password. It is
43      * the caller's responsibility to zero out the password information after
44      * it is no longer needed.
45      *
46      * @return the password.
47      */

48     public char[] getPassword();
49
50     /**
51      * Returns the salt or null if not specified.
52      *
53      * <p> Note: this method should return a copy of the salt. It is
54      * the caller's responsibility to zero out the salt information after
55      * it is no longer needed.
56      *
57      * @return the salt.
58      */

59     public byte[] getSalt();
60
61     /**
62      * Returns the iteration count or 0 if not specified.
63      *
64      * @return the iteration count.
65      */

66     public int getIterationCount();
67 }
68
Popular Tags