Module bus.crypto

Enum Class Padding

java.lang.Object
java.lang.Enum<Padding>
org.miaixz.bus.crypto.Padding
All Implemented Interfaces:
Serializable, Comparable<Padding>, Constable

public enum Padding extends Enum<Padding>
补码方式 补码方式是在分组密码中,当明文长度不是分组长度的整数倍时,需要在最后一个分组中填充一些数据使其凑满一个分组的长度。
Since:
Java 17+
Author:
Kimi Liu
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    This padding for block ciphers is described in 5.2 Block Encryption Algorithms in the W3C's "XML Encryption Syntax and Processing" document.
    无补码
    Optimal Asymmetric Encryption Padding scheme defined in PKCS1
    The padding scheme described in PKCS #1, used with the RSA algorithm
    The padding scheme described in RSA Laboratories, "PKCS #5: Password-Based Encryption Standard," version 1.5, November 1993.
    The padding scheme described in RSA Laboratories, "PKCS #7: Password-Based Encryption Standard," version 1.5, November 1993.
    The padding scheme defined in the SSL Protocol Version 3.0, November 18, 1996, section 5.2.3.2 (CBC block cipher)
    0补码,即不满block长度时使用0填充
  • Method Summary

    Modifier and Type
    Method
    Description
    static Padding
    Returns the enum constant of this class with the specified name.
    static Padding[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NoPadding

      public static final Padding NoPadding
      无补码
    • ZeroPadding

      public static final Padding ZeroPadding
      0补码,即不满block长度时使用0填充
    • ISO10126Padding

      public static final Padding ISO10126Padding
      This padding for block ciphers is described in 5.2 Block Encryption Algorithms in the W3C's "XML Encryption Syntax and Processing" document.
    • OAEPPadding

      public static final Padding OAEPPadding
      Optimal Asymmetric Encryption Padding scheme defined in PKCS1
    • PKCS1Padding

      public static final Padding PKCS1Padding
      The padding scheme described in PKCS #1, used with the RSA algorithm
    • PKCS5Padding

      public static final Padding PKCS5Padding
      The padding scheme described in RSA Laboratories, "PKCS #5: Password-Based Encryption Standard," version 1.5, November 1993.
    • PKCS7Padding

      public static final Padding PKCS7Padding
      The padding scheme described in RSA Laboratories, "PKCS #7: Password-Based Encryption Standard," version 1.5, November 1993.
    • SSL3Padding

      public static final Padding SSL3Padding
      The padding scheme defined in the SSL Protocol Version 3.0, November 18, 1996, section 5.2.3.2 (CBC block cipher)
  • Method Details

    • values

      public static Padding[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Padding valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null