Exemple #1
0
 public String toString() {
   return "TPM_QuoteOutput (data params only):\n"
       + "PCRData = \n"
       + this.getPcrData()
       + "\n"
       + "Signature ("
       + this.getSigSize()
       + " bytes): "
       + ByteArrayUtil.toHexString(this.getSig());
 }
  @Override
  public String toString() {
    String labelString = "";

    if (label != null) {
      char[] labelBytes = new char[4];
      for (int i = 0; (i < 4) && (i < label.length); i++) {
        labelBytes[i] = (char) label[i];
      }

      labelString = " (" + String.copyValueOf(labelBytes) + ")";
    }

    return "TPM_COUNTER_VALUE: "
        + "label: 0x"
        + ByteArrayUtil.toHexString(this.label)
        + labelString
        + ", counter value: 0x"
        + Integer.toHexString(this.counter);
  }
 @Override
 public byte[] toBytes() {
   return ByteArrayUtil.buildBuf(this.getTag(), this.label, this.counter);
 }