JavaTM Platform
Standard Ed. 6

类 javax.crypto.Cipher
的使用

使用 Cipher 的软件包
javax.crypto 为加密操作提供类和接口。 
 

javax.crypto 中 Cipher 的使用
 

javax.crypto 中 Cipher 的子类
 class NullCipher
          NullCipher 类是一个提供“标识密码”的类,其不转换纯文本。
 

返回 Cipher 的 javax.crypto 中的方法
static Cipher Cipher.getInstance(String transformation)
          返回实现指定转换的 Cipher 对象。
static Cipher Cipher.getInstance(String transformation, Provider provider)
          返回实现指定转换的 Cipher 对象。
static Cipher Cipher.getInstance(String transformation, String provider)
          返回实现指定转换的 Cipher 对象。
 

参数类型为 Cipher 的 javax.crypto 中的方法
 PKCS8EncodedKeySpec EncryptedPrivateKeyInfo.getKeySpec(Cipher cipher)
          将密封的 PKCS8EncodedKeySpec 对象从加密的数据中抽取出来并将其返回。
 Object SealedObject.getObject(Cipher c)
          获取原始(封装的)对象。
 

参数类型为 Cipher 的 javax.crypto 中的构造方法
CipherInputStream(InputStream is, Cipher c)
          根据 InputStream 和 Cipher 构造 CipherInputStream。
CipherOutputStream(OutputStream os, Cipher c)
          从 OutputStream 和 Cipher 构造 CipherOutputStream。
SealedObject(Serializable object, Cipher c)
          从任何 Serializable 对象构造一个 SealedObject。
 


JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。