Record Class CryptoDetector.CryptoAnalysis

java.lang.Object
java.lang.Record
cloud.opencode.base.crypto.util.CryptoDetector.CryptoAnalysis
Record Components:
entropy - Shannon entropy value | 香农熵值
looksEncrypted - whether data appears encrypted | 数据是否看起来被加密
looksCompressed - whether data appears compressed | 数据是否看起来被压缩
hasTextContent - whether data contains readable text | 数据是否包含可读文本
uniformDistribution - whether byte distribution is uniform | 字节分布是否均匀
detectedEncoding - detected encoding type | 检测到的编码类型
detectedKeyFormat - detected key format (if applicable) | 检测到的密钥格式(如果适用)
detectedHashFormat - detected hash format (if applicable) | 检测到的哈希格式(如果适用)
Enclosing class:
CryptoDetector

public static record CryptoDetector.CryptoAnalysis(double entropy, boolean looksEncrypted, boolean looksCompressed, boolean hasTextContent, boolean uniformDistribution, CryptoDetector.EncodingType detectedEncoding, CryptoDetector.KeyFormat detectedKeyFormat, CryptoDetector.HashFormat detectedHashFormat) extends Record
Result of cryptographic analysis. 加密分析结果。
Since:
JDK 25, opencode-base-crypto V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

  • Method Details

    • isCryptographic

      public boolean isCryptographic()
      Returns true if the data appears to be cryptographic in nature. 如果数据看起来具有加密性质则返回 true。
      Returns:
      true if cryptographic patterns detected | 如果检测到加密模式则返回 true
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • entropy

      public double entropy()
      Returns the value of the entropy record component.
      Returns:
      the value of the entropy record component
    • looksEncrypted

      public boolean looksEncrypted()
      Returns the value of the looksEncrypted record component.
      Returns:
      the value of the looksEncrypted record component
    • looksCompressed

      public boolean looksCompressed()
      Returns the value of the looksCompressed record component.
      Returns:
      the value of the looksCompressed record component
    • hasTextContent

      public boolean hasTextContent()
      Returns the value of the hasTextContent record component.
      Returns:
      the value of the hasTextContent record component
    • uniformDistribution

      public boolean uniformDistribution()
      Returns the value of the uniformDistribution record component.
      Returns:
      the value of the uniformDistribution record component
    • detectedEncoding

      public CryptoDetector.EncodingType detectedEncoding()
      Returns the value of the detectedEncoding record component.
      Returns:
      the value of the detectedEncoding record component
    • detectedKeyFormat

      public CryptoDetector.KeyFormat detectedKeyFormat()
      Returns the value of the detectedKeyFormat record component.
      Returns:
      the value of the detectedKeyFormat record component
    • detectedHashFormat

      public CryptoDetector.HashFormat detectedHashFormat()
      Returns the value of the detectedHashFormat record component.
      Returns:
      the value of the detectedHashFormat record component