23.07.2013 Views

Java IO.pdf - Nguyen Dang Binh

Java IO.pdf - Nguyen Dang Binh

Java IO.pdf - Nguyen Dang Binh

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Java</strong> I/O<br />

DES, triple DES (DESede), and password-based encryption (PBE). RSA's payware JSafe<br />

product has a security provider that provides the RSA, DES, DESede, RC2, RC4, and RC5<br />

cipher algorithms. Ireland's Baltimore Technologies payware J/Crypto software has a security<br />

provider that provides the RSA, DES, DESede, RC2, RC4, and PBE cipher algorithms. Table<br />

10.2 lists several of the available security providers and the algorithms they implement.<br />

Product<br />

(Company,<br />

Country)<br />

JDK<br />

U.S.)<br />

1.2 (Sun,<br />

Table 10.2. Security Providers<br />

URL Digests Ciphers License<br />

http://java.sun.com/products/jdk/1.2/<br />

JCE (Sun, U.S.) http://java.sun.com/products/jce/index.html<br />

JSafe (RSA Data<br />

Security, U.S.)<br />

http://www.rsa.com/rsa/products/jsafe/<br />

IAIK-JCE<br />

(Institute for<br />

Applied<br />

Information http://wwwjce.iaik.tu-graz.ac.at/product/jce/index.php<br />

Processing and<br />

Communications,<br />

Austria)<br />

SHA,<br />

MD5<br />

SHA,<br />

MD5<br />

SHA,<br />

MD5<br />

JCP CDK (JCP<br />

Computer<br />

http://www.jcp.co.uk/secProducts/security_cdk_index.html<br />

Services LTD,<br />

U.K.)<br />

SHA,<br />

MD5<br />

Cryptix (the<br />

Internet)<br />

J/Crypto<br />

(Baltimore<br />

Technologies,<br />

Ireland)<br />

http://www.cryptix.org/<br />

http://www.baltimore.ie/products/jcrypto/index.html<br />

Haval,<br />

MD2,<br />

MD4,<br />

MD5,<br />

RIPE-<br />

MD128,<br />

RIPE-<br />

MD160,<br />

SHA<br />

SHA,<br />

MD5<br />

None Free<br />

Blowfish,<br />

DESede,<br />

DES, PBE<br />

DESede,<br />

DES,<br />

RC2,<br />

RC4, RC5<br />

DESede,<br />

DES,<br />

IDEA,<br />

RC2, RC4<br />

Free<br />

Payware<br />

Free for<br />

noncommercial<br />

use<br />

DESede,<br />

DES,<br />

Payware<br />

IDEA,<br />

RSA, RC4<br />

Blowfish,<br />

CAST 5,<br />

DES,<br />

DESede,<br />

El Gamal,<br />

IDEA, Open<br />

Loki, source<br />

RC2,<br />

RC4,<br />

Safer,<br />

Speed,<br />

Square<br />

DESede,<br />

DES,<br />

RSA,<br />

RC4, PBE<br />

Per-copy or<br />

per-user<br />

royalty<br />

Most providers provide some unique algorithms. However, providers usually also include<br />

some algorithms already supplied by other providers. At compile time, you do not know<br />

which providers will be installed at runtime. Indeed, different people running your program<br />

are likely to have different providers available, especially if you ship internationally.<br />

Therefore, rather than using constructors, the Cipher class relies on two static<br />

getInstance() factory methods that return Cipher objects initialized to support particular<br />

transformations:<br />

213

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!