Module java.base

Package java.security


package java.security
提供了安全框架的类和接口。这包括实现了易于配置的、细粒度访问控制安全架构的类。该包还支持生成和存储加密公钥对,以及一些可导出的加密操作,包括消息摘要和签名生成。最后,该包提供支持签名/受保护对象和安全随机数生成的类。该包中提供的许多类(特别是加密和安全随机数生成器类)是基于提供者的。该类本身定义了应用程序可以编写的编程接口。然后,实现本身可以由独立的第三方供应商编写,并根据需要无缝地插入。因此,应用程序开发人员可以利用任意数量的基于提供者的实现,而无需添加或重写代码。

包规范

有关更多文档,请参阅:
自:
1.1
  • Class
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release.
    该接口指定了加密算法、密钥(密钥大小)和其他算法参数的约束。
    AlgorithmParameterGenerator类用于生成用于特定算法的一组参数。
    该类为AlgorithmParameterGenerator类定义了服务提供程序接口SPI),用于生成用于特定算法的一组参数。
    该类用作加密参数的不透明表示。
    该类为AlgorithmParameters类定义了服务提供程序接口SPI),用于管理算法参数。
    AllPermission是一个意味着所有其他权限的权限。
    该类为提供程序定义了登录和注销方法。
    BasicPermission类扩展了Permission类,可用作要遵循与BasicPermission相同命名约定的权限的基类。
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is deprecated and subject to removal in a future version of Java SE.
    该类封装了有关代码签名者的信息。
    该类扩展了代码库的概念,以封装不仅位置(URL)而且用于验证来自该位置的已签名代码的证书链。
    加密原语的枚举。
    这是通用的消息摘要异常。
    一个透明流,使用通过流传递的位更新相关的消息摘要。
    一个透明流,使用通过流传递的位更新相关的消息摘要。
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release.
    指定密钥库域中密钥库的配置数据。
    该类指定了DRBG(确定性随机位生成器)使用的参数。
    DRBG的可重新种植和预测抵抗能力。
    用于实例化的DRBG参数。
    用于生成随机位的DRBG参数。
    用于重新种植的DRBG参数。
    GeneralSecurityException类是一个通用的安全异常类,为所有从它扩展的与安全相关的异常类提供类型安全性。
    该接口表示一个守卫,用于保护对另一个对象的访问。
    一个GuardedObject是一个用于保护对另一个对象的访问的对象。
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is deprecated and subject to removal in a future version of Java SE.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is deprecated and subject to removal in a future version of Java SE.
    用于无效或不适当算法参数的异常。
    用于无效密钥(无效编码、长度错误、未初始化等)的异常。
    该异常由JCA/JCE引擎类使用,当向方法传递无效参数时抛出。
    Key
    Key接口是所有密钥的顶级接口。
    这是基本密钥异常。
    密钥工厂用于将密钥(类型为Key的不透明加密密钥)转换为密钥规范(底层密钥材料的透明表示),反之亦然。
    该类为KeyFactory类定义了服务提供程序接口SPI)。
    用于处理密钥管理的所有操作的一般密钥管理异常。
    该类是密钥对(公钥和私钥)的简单持有者。
    KeyPairGenerator类用于生成公钥和私钥对。
    该类为KeyPairGenerator类定义了服务提供程序接口SPI),用于生成公钥和私钥对。
    序列化Key对象的标准化表示。
    密钥类型。
    该类表示用于存储加密密钥和证书的存储设施。
    要实例化的KeyStore对象的描述。
    封装了一个CallbackHandler的ProtectionParameter
    KeyStore条目类型的标记接口。
    与密钥库条目相关联的属性。
    用于KeyStore loadstore参数的标记接口。
    基于密码的ProtectionParameter实现。
    一个KeyStore条目,包含一个PrivateKey和相应的证书链。
    用于密钥库保护参数的标记接口。
    一个KeyStore条目,包含一个SecretKey
    一个KeyStore条目,包含一个受信任的Certificate
    通用KeyStore异常。
    该类为KeyStore类定义了服务提供程序接口SPI)。
    MessageDigest类为应用程序提供了消息摘要算法(例如SHA-1或SHA-256)的功能。
    该类为MessageDigest类定义了服务提供程序接口SPI),提供了消息摘要算法(例如MD5或SHA)的功能。
    当请求特定的加密算法但环境中不存在时抛出此异常。
    当请求特定的安全提供程序但环境中不存在时抛出此异常。
    用于表示对系统资源的访问的抽象类。
    表示一组Permission对象的抽象类。
    该类表示一组权限的异构集合。
    与PKCS12密钥库条目相关联的属性。
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release.
    该接口表示Principal的抽象概念,可用于表示任何实体,如个人、公司和登录ID。
    私钥。
    在启用权限的情况下执行的计算。
    doPrivileged(PrivilegedExceptionAction)doPrivileged(PrivilegedExceptionAction, AccessControlContext context)抛出,指示正在执行的操作抛出了已检查异常。
    在启用权限的情况下执行的计算,可能抛出一个或多个已检查异常。
    ProtectionDomain类封装了域的特征,该域包含一组在代表给定一组主体执行时被授予一组权限的类的实例。
    该类表示Java安全API的“提供程序”,其中提供程序实现了Java安全的一些或所有部分。
    安全服务的描述。
    用于Provider异常(如配置错误或不可恢复的内部错误)的运行时异常,可以由提供程序进行子类化以抛出专门的、特定于提供程序的运行时错误。
    公钥。
    该类扩展了ClassLoader,提供了额外的支持,用于定义具有关联代码源和默认情况下由系统策略检索的权限的类。
    这个类提供了一个密码学强随机数生成器(RNG)。
    用于各种SecureRandom方法中使用的参数的标记接口。
    这个类为SecureRandom类定义了服务提供者接口SPI)。
    这个类集中了所有安全属性和常见安全方法。
    这个类用于安全权限。
    Signature类用于为应用程序提供数字签名算法的功能。
    这是通用的签名异常。
    这个类为Signature类定义了服务提供者接口SPI),用于提供数字签名算法的功能。
    SignedObject是一个用于创建真实运行时对象的类,其完整性无法在未被检测到的情况下被破坏。
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is deprecated and subject to removal in a future version of Java SE.
    这个类封装了有关已签名时间戳的信息。
    如果无法恢复密钥库中的条目,则抛出此异常。
    如果无法恢复密钥库中的密钥,则抛出此异常。
    UnresolvedPermission类用于保存在初始化策略时“未解析”的权限。
    包含指向供PolicySpi或ConfigurationSpi实现使用的数据的URI的参数。