java类库详细讲解
源代码在线查看: listcipher.html
Listing All Available Encryption and Decryption Algorithms
(Java Developers Almanac Example)
BODY CODE {font-family: Courier, Monospace; font-size: 11pt} TABLE, BODY {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt} PRE {font-family: Courier, Monospace; font-size: 10pt} H3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11pt} A.eglink {text-decoration: none} A:hover.eglink {text-decoration: underline} -->
The Java Developers Almanac 1.4
Order this book from Amazon.
Home
>
List of Packages
>
javax.crypto
[14 examples]
>
Encrypting and Decrypting
[6 examples]
e461.
Listing All Available Encryption and Decryption Algorithms
Retrieving the list of available encryption/decryption algorithms
requires checking the services provided by all registered providers.
The retrieved list of names can be used in creating a Cipher object.
// This method is implemented in e194 Listing All Available Cryptographic Services
String[] names = getCryptoImpls("Cipher");
An example of the output:
Blowfish
DESede
PBEWithMD5AndTripleDES
TripleDES
DES
PBEWithMD5AndDES
Related Examples
e462.
Encrypting a String with DES
e463.
Encrypting a File or Stream with DES
e464.
Encrypting with DES Using a Pass Phrase
e465.
Converting a 56-bit Value to a DES Key
e466.
Encrypting an Object with DES
See also:
Key Agreement
MAC
Symmetric Keys
© 2002 Addison-Wesley.