24package org.cipherpack;
26import java.time.Instant;
27import java.time.ZoneOffset;
28import java.time.ZonedDateTime;
29import java.util.ArrayList;
32import org.jau.util.BasicTypes;
91 this.target_path =
"";
92 this.plaintext_size = 0;
93 this.ts_creation_sec = 0;
94 this.ts_creation_nsec = 0;
96 this.plaintext_version =
"0";
97 this.plaintext_version_parent =
"0";
99 this.sender_fingerprint =
new byte[0];
100 this.recevr_fingerprints =
new ArrayList<byte[]>();
101 this.used_recevr_key_idx = -1;
102 this.plaintext_hash_algo =
"";
103 this.plaintext_hash =
new byte[0];
108 final long plaintext_size_,
109 final long ts_creation_sec_,
110 final long ts_creation_nsec_,
111 final String subject_,
112 final String pversion,
final String pversion_parent,
114 final byte[] sender_key_fingerprint_,
115 final List<
byte[]> recevr_fingerprint_,
116 final int used_recevr_key_idx_,
117 final String plaintext_hash_algo_,
118 final byte[] plaintext_hash_,
119 final boolean valid_) {
120 this.target_path = target_path_;
121 this.plaintext_size = plaintext_size_;
122 this.ts_creation_sec = ts_creation_sec_;
123 this.ts_creation_nsec = ts_creation_nsec_;
124 this.subject = subject_;
125 this.plaintext_version = pversion;
126 this.plaintext_version_parent = pversion_parent;
127 this.crypto_cfg = crypto_cfg_;
128 this.sender_fingerprint = sender_key_fingerprint_;
129 this.recevr_fingerprints = recevr_fingerprint_;
130 this.used_recevr_key_idx = used_recevr_key_idx_;
131 this.plaintext_hash_algo = plaintext_hash_algo_;
132 this.plaintext_hash = plaintext_hash_;
142 public String
toString(
final boolean show_crypto_algos,
final boolean force_all_fingerprints) {
145 final StringBuilder recevr_fingerprint =
new StringBuilder();
149 recevr_fingerprint.append(
"dec '").append(BasicTypes.bytesHexString(fp, 0, fp.length,
true )).append(
"', ");
152 recevr_fingerprint.append(
"enc[");
156 recevr_fingerprint.append(
", ");
158 recevr_fingerprint.append(
"'").append(BasicTypes.bytesHexString(tkf, 0, tkf.length,
true )).append(
"'");
161 recevr_fingerprint.append(
"]");
165 final String res =
"Header[valid "+
valid+
167 "], creation "+utc_creation.toString()+
" , subject '"+
subject+
"', "+
171 "', recevr["+recevr_fingerprint+
CryptoConfig, contains crypto algorithms settings given at encryption wired via the Cipherpack Data S...