summaryrefslogtreecommitdiff
path: root/libjava/doc/java-security.texi
blob: c1a5da87fe1abe18e6466a3c154999544344f13e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
@deftypemethod BasicPermission {public boolean} implies (java.security.Permission@w{ }@var{perm}) 
This method tests to see if the specified permission is implied by 
 this permission.  This will be true if the following conditions are met:
 


 
@itemize @bullet

 
@item
The specified object is an instance of @code{BasicPermission}, 
 or a subclass.
 
@item
The name of the specified permission is identical to this permission's
 name or the name of the specified permission satisfies a wildcard match 
 on this permission.
 
@end itemize

@end deftypemethod
@deftypemethod BasicPermission {public boolean} equals (java.lang.Object@w{ }@var{obj}) 
This method tests to see if this object is equal to the specified
 @code{Object}.  This will be true if and only if the specified
 object meets the following conditions:
 


 
@itemize @bullet

 
@item
It is an instance of @code{BasicPermission}, or a subclass.
 
@item
It has the same name as this permission.
 
@end itemize

@end deftypemethod
@deftypemethod BasicPermission {public int} hashCode () 
This method returns a hash code for this permission object.  The hash
 code returned is the value returned by calling the @code{hashCode}
 method on the @code{String} that is the name of this permission.
@end deftypemethod
@deftypemethod BasicPermission {public String} getActions () 
This method returns a list of the actions associated with this 
 permission.  This method always returns the empty string ("") since
 this class ignores actions.
@end deftypemethod
@deftypemethod BasicPermission {public PermissionCollection} newPermissionCollection () 
This method returns an instance of @code{PermissionCollection}
 suitable for storing @code{BasicPermission} objects.  This returns
 be a sub class of @code{PermissionCollection}
 that allows for an efficient and consistent implementation of
 the @code{implies} method.  The collection doesn't handle subclasses
 of BasicPermission correctly; they must override this method.
@end deftypemethod
@deftypemethod DigestOutputStream {public MessageDigest} getMessageDigest () 
Returns the MessageDigest associated with this DigestOutputStream
@end deftypemethod
@deftypemethod DigestOutputStream {public void} setMessageDigest (java.security.MessageDigest@w{ }@var{digest}) 
Sets the current MessageDigest to current parameter
@end deftypemethod
@deftypemethod DigestOutputStream {public void} write (int@w{ }@var{b}) @*throws IOException
Updates the hash if the on flag is true and then writes a byte to
the underlying output stream.
@end deftypemethod
@deftypemethod DigestOutputStream {public void} write (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
Updates the hash if the on flag is true and then writes the bytes
to the underlying output stream.
@end deftypemethod
@deftypemethod DigestOutputStream {public void} on (boolean@w{ }@var{on}) 
Sets the flag specifying if this DigestOutputStream updates the
digest in the write() methods. The default is on;
@end deftypemethod
@deftypemethod DigestOutputStream {public String} toString () 
Converts the output stream and underlying message digest to a string.
@end deftypemethod
@deftypemethod Guard {public void} checkGuard (java.lang.Object@w{ }@var{obj}) @*throws SecurityException
This method tests whether or not access is allowed to the specified
 guarded object.  Access is allowed if this method returns silently.  If
 access is denied, an exception is generated.
@end deftypemethod
@deftypemethod Key {public String} getAlgorithm () 

@end deftypemethod
@deftypemethod Key {public String} getFormat () 

@end deftypemethod
@deftypemethod Key {public byte} getEncoded () 

@end deftypemethod
@deftypemethod KeyPairGenerator {public static KeyPairGenerator} getInstance (java.lang.String@w{ }@var{algorithm}) @*throws NoSuchAlgorithmException

@end deftypemethod
@deftypemethod KeyPairGenerator {public static KeyPairGenerator} getInstance (java.lang.String@w{ }@var{algorithm}, java.lang.String@w{ }@var{provider}) @*throws NoSuchAlgorithmException, NoSuchProviderException

@end deftypemethod
@deftypemethod KeyPairGenerator {public String} getAlgorithm () 

@end deftypemethod
@deftypemethod KeyPairGenerator {public abstract void} initialize (int@w{ }@var{strength}, java.security.SecureRandom@w{ }@var{random}) 

@end deftypemethod
@deftypemethod KeyPairGenerator {public abstract KeyPair} generateKeyPair () 

@end deftypemethod
@deftypemethod KeyPairGeneratorSpi {public abstract void} initialize (int@w{ }@var{keysize}, java.security.SecureRandom@w{ }@var{random}) 

@end deftypemethod
@deftypemethod KeyPairGeneratorSpi {public abstract KeyPair} generateKeyPair () 

@end deftypemethod
@deftypemethod KeyPair {public PublicKey} getPublic () 

@end deftypemethod
@deftypemethod KeyPair {public PrivateKey} getPrivate () 

@end deftypemethod
@deftypemethod MessageDigest {public static MessageDigest} getInstance (java.lang.String@w{ }@var{algorithm}) @*throws NoSuchAlgorithmException

@end deftypemethod
@deftypemethod MessageDigest {public static MessageDigest} getInstance (java.lang.String@w{ }@var{algorithm}, java.lang.String@w{ }@var{provider}) @*throws NoSuchAlgorithmException, NoSuchProviderException

@end deftypemethod
@deftypemethod MessageDigest {public void} update (byte@w{ }@var{input}) 

@end deftypemethod
@deftypemethod MessageDigest {public void} update (byte[]@w{ }@var{input}, int@w{ }@var{offset}, int@w{ }@var{len}) 

@end deftypemethod
@deftypemethod MessageDigest {public void} update (byte[]@w{ }@var{input}) 

@end deftypemethod
@deftypemethod MessageDigest {public byte} digest () 

@end deftypemethod
@deftypemethod MessageDigest {public byte} digest (byte[]@w{ }@var{input}) 

@end deftypemethod
@deftypemethod MessageDigest {public String} toString () 

@end deftypemethod
@deftypemethod MessageDigest {public static boolean} isEqual (byte[]@w{ }@var{digesta}, byte[]@w{ }@var{digestb}) 

@end deftypemethod
@deftypemethod MessageDigest {public void} reset () 

@end deftypemethod
@deftypemethod MessageDigest {public final String} getAlgorithm () 

@end deftypemethod
@deftypemethod MessageDigest {protected abstract void} engineUpdate (byte@w{ }@var{input}) 

@end deftypemethod
@deftypemethod MessageDigest {protected abstract void} engineUpdate (byte[]@w{ }@var{input}, int@w{ }@var{offset}, int@w{ }@var{len}) 

@end deftypemethod
@deftypemethod MessageDigest {protected abstract byte} engineDigest () 

@end deftypemethod
@deftypemethod MessageDigest {protected abstract void} engineReset () 

@end deftypemethod
@deftypemethod MessageDigest {public Object} clone () @*throws CloneNotSupportedException

@end deftypemethod
@deftypemethod PermissionCollection {public boolean} isReadOnly () 
This method tests whether or not this @code{PermissionCollection}
 object is read only.
@end deftypemethod
@deftypemethod PermissionCollection {public void} setReadOnly () 
This method sets this @code{PermissionCollection} object to be
 read only.  No further permissions can be added to it after calling this
 method.
@end deftypemethod
@deftypemethod PermissionCollection {public abstract void} add (java.security.Permission@w{ }@var{perm}) @*throws SecurityException, IllegalArgumentException
This method adds a new @code{Permission} object to the collection.
@end deftypemethod
@deftypemethod PermissionCollection {public abstract Enumeration} elements () 
This method returns an @code{Enumeration} of all the objects in
 this collection.
@end deftypemethod
@deftypemethod PermissionCollection {public abstract boolean} implies (java.security.Permission@w{ }@var{perm}) 
This method tests whether the specified @code{Permission} object is
 implied by this collection of @code{Permission} objects.
@end deftypemethod
@deftypemethod PermissionCollection {public String} toString () 
This method returns a @code{String} representation of this
 collection.  It will print the class name and has code in the same
 manner as @code{Object.toString()} then print a listing of all
 the @code{Permission} objects contained.
@end deftypemethod
@deftypemethod Permission {public String} getName () 
This method returns the name of this @code{Permission}
@end deftypemethod
@deftypemethod Permission {public abstract String} getActions () 
This method returns the list of actions for this @code{Permission}
 as a @code{String}.
@end deftypemethod
@deftypemethod Permission {public void} checkGuard (java.lang.Object@w{ }@var{obj}) @*throws SecurityException
This method implements the @code{Guard} interface for this class.
 It calls the @code{checkPermission} method in 
 @code{SecurityManager} with this @code{Permission} as its
 argument.  This method returns silently if the security check succeeds
 or throws an exception if it fails.
@end deftypemethod
@deftypemethod Permission {public abstract boolean} implies (java.security.Permission@w{ }@var{perm}) 
This method tests whether this @code{Permission} implies that the
 specified @code{Permission} is also granted.
@end deftypemethod
@deftypemethod Permission {public abstract int} hashCode () 
This method returns a hash code for this @code{Permission}.
@end deftypemethod
@deftypemethod Permission {public String} toString () 
This method returns a @code{String} representation of this
 @code{Permission} object.
@end deftypemethod
@deftypemethod Permission {public PermissionCollection} newPermissionCollection () 
This method returns an empty @code{PermissionCollection} object
 that can store permissions of this type, or @code{null} if no
 such collection is defined.
@end deftypemethod
@deftypemethod Principal {public String} getName () 
This method returns a @code{String} that names this 
 @code{Principal}.
@end deftypemethod
@deftypemethod Principal {public boolean} equals (java.lang.Object@w{ }@var{obj}) 
This method tests another @code{Principal} object for equality
 with this one.
@end deftypemethod
@deftypemethod Principal {public int} hashCode () 
This method returns a hash code value for this @code{Principal}.
@end deftypemethod
@deftypemethod Principal {public String} toString () 
This method returns a @code{String} representation of this
 @code{Principal}.
@end deftypemethod
@deftypemethod Provider {public String} getName () 
This method returns the name assigned to this @code{Provider}.
@end deftypemethod
@deftypemethod Provider {public double} getVersion () 
This method retunrs the version number of this @code{Provider}.
@end deftypemethod
@deftypemethod Provider {public String} getInfo () 
This method returns a textual description of the @code{Provider}.
@end deftypemethod
@deftypemethod Provider {public Object} put (java.lang.Object@w{ }@var{key}, java.lang.Object@w{ }@var{value}) 
This method sets the specified key to have the specified value.
@end deftypemethod
@deftypemethod Provider {public Object} remove (java.lang.Object@w{ }@var{key}) 
This method removes the specified key entry (and its associated value)
 from the property mapping list.
@end deftypemethod
@deftypemethod Provider {public void} clear () 
This method clears the entire property list such that it no longer
 contains the properties used to look up the services provided by
 the @code{Provider}.
@end deftypemethod
@deftypemethod Provider {public String} toString () 
This method returns a @code{String} representation of this
 object.  This will include the @code{Provider} name and
 version number.
@end deftypemethod
@deftypemethod Security {public static int} insertProviderAt (java.security.Provider@w{ }@var{provider}, int@w{ }@var{position}) 

@end deftypemethod
@deftypemethod Security {public static int} addProvider (java.security.Provider@w{ }@var{provider}) 

@end deftypemethod
@deftypemethod Security {public static void} removeProvider (java.lang.String@w{ }@var{name}) 

@end deftypemethod
@deftypemethod Security {public static Provider} getProviders () 

@end deftypemethod
@deftypemethod Security {public static Provider} getProvider (java.lang.String@w{ }@var{name}) 

@end deftypemethod
@deftypemethod Security {public static String} getProperty (java.lang.String@w{ }@var{key}) 

@end deftypemethod
@deftypemethod Security {public static void} setProperty (java.lang.String@w{ }@var{key}, java.lang.String@w{ }@var{value}) 

@end deftypemethod
@deftypemethod Signature {public static Signature} getInstance (java.lang.String@w{ }@var{algorithm}) @*throws NoSuchAlgorithmException

@end deftypemethod
@deftypemethod Signature {public static Signature} getInstance (java.lang.String@w{ }@var{algorithm}, java.lang.String@w{ }@var{provider}) @*throws NoSuchAlgorithmException, NoSuchProviderException

@end deftypemethod
@deftypemethod Signature {public final void} initVerify (java.security.PublicKey@w{ }@var{publicKey}) @*throws InvalidKeyException

@end deftypemethod
@deftypemethod Signature {public final void} initSign (java.security.PrivateKey@w{ }@var{privateKey}) @*throws InvalidKeyException

@end deftypemethod
@deftypemethod Signature {public final byte} sign () @*throws SignatureException

@end deftypemethod
@deftypemethod Signature {public final boolean} verify (byte[]@w{ }@var{signature}) @*throws SignatureException

@end deftypemethod
@deftypemethod Signature {public final void} update (byte@w{ }@var{b}) @*throws SignatureException

@end deftypemethod
@deftypemethod Signature {public final void} update (byte[]@w{ }@var{data}) @*throws SignatureException

@end deftypemethod
@deftypemethod Signature {public final void} update (byte[]@w{ }@var{data}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws SignatureException

@end deftypemethod
@deftypemethod Signature {public final String} getAlgorithm () 

@end deftypemethod
@deftypemethod Signature {public String} toString () 

@end deftypemethod
@deftypemethod Signature {public final void} setParameter (java.lang.String@w{ }@var{param}, java.lang.Object@w{ }@var{value}) @*throws InvalidParameterException

@end deftypemethod
@deftypemethod Signature {public final Object} getParameter (java.lang.String@w{ }@var{param}) @*throws InvalidParameterException

@end deftypemethod
@deftypemethod Signature {protected abstract void} engineInitVerify (java.security.PublicKey@w{ }@var{publicKey}) @*throws InvalidKeyException

@end deftypemethod
@deftypemethod Signature {protected abstract void} engineInitSign (java.security.PrivateKey@w{ }@var{privateKey}) @*throws InvalidKeyException

@end deftypemethod
@deftypemethod Signature {protected abstract void} engineUpdate (byte@w{ }@var{b}) @*throws SignatureException

@end deftypemethod
@deftypemethod Signature {protected abstract void} engineUpdate (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws SignatureException

@end deftypemethod
@deftypemethod Signature {protected abstract byte} engineSign () @*throws SignatureException

@end deftypemethod
@deftypemethod Signature {protected abstract boolean} engineVerify (byte[]@w{ }@var{sigBytes}) @*throws SignatureException

@end deftypemethod
@deftypemethod Signature {protected abstract void} engineSetParameter (java.lang.String@w{ }@var{param}, java.lang.Object@w{ }@var{value}) @*throws InvalidParameterException

@end deftypemethod
@deftypemethod Signature {protected abstract Object} engineGetParameter (java.lang.String@w{ }@var{param}) @*throws InvalidParameterException

@end deftypemethod
@deftypemethod Signature {public Object} clone () @*throws CloneNotSupportedException

@end deftypemethod