Package cn.gmkit.sm2

Class SM2Ciphertext

java.lang.Object
cn.gmkit.sm2.SM2Ciphertext

public final class SM2Ciphertext extends Object
SM2 原始密文分段视图。

将原始密文拆分为 C1、C2、C3 三段并保留当前排列模式。

  • Constructor Details

    • SM2Ciphertext

      public SM2Ciphertext(byte[] c1, byte[] c2, byte[] c3, SM2CipherMode mode)
      创建一个 SM2 密文分段对象。
      Parameters:
      c1 - 椭圆曲线点 C1
      c2 - 密文段 C2
      c3 - 摘要段 C3
      mode - 密文排列模式
  • Method Details

    • c1

      public byte[] c1()
      获取 C1 段。
      Returns:
      C1 字节数组的防御性拷贝
    • c2

      public byte[] c2()
      获取 C2 段。
      Returns:
      C2 字节数组的防御性拷贝
    • c3

      public byte[] c3()
      获取 C3 段。
      Returns:
      C3 字节数组的防御性拷贝
    • mode

      public SM2CipherMode mode()
      获取密文排列模式。
      Returns:
      密文排列模式