# Re: getEncoded() method in Key

Jan Luehe (luehe@laguna.eng.sun.com)
Tue, 12 Jan 1999 18:54:17 -0800 (PST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: bpusei: "Help us Please !"
- Previous message: Gao Kai: "getEncoded() method in Key"
- Maybe in reply to: Gao Kai: "getEncoded() method in Key"

Gao:

> Why the Key interface contains getEncoded() method, but no getDecoded()
> method? The document said the getEncoded() method is for transmit
> purpose, so when I get the encoded format of the Key, how can I rebuild
> it to the Key object? Waiting for your reply.

You encapsulate the encoding in the appropriate key specification
and pass it to a (provider-based) key factory.

More details (and examples) under

http://java.sun.com/products/jdk/1.2/docs/guide/security/CryptoSpec.html#KeyFact
ory
Jan

- Next message: bpusei: "Help us Please !"
- Previous message: Gao Kai: "getEncoded() method in Key"
- Maybe in reply to: Gao Kai: "getEncoded() method in Key"