xray: print "assuming AES-GCM mode" unless -aessiv is passed

To alert the user that they can and should choose the
right mode.
This commit is contained in:
Jakob Unterwurzacher 2019-01-04 19:34:15 +01:00
parent 8c18fb5db9
commit 2024616722
2 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,8 @@ func prettyPrintHeader(h *contentenc.FileHeader, aessiv bool) {
msg := "Header: Version: %d, Id: %s"
if aessiv {
msg += ", assuming AES-SIV mode"
} else {
msg += ", assuming AES-GCM mode"
}
fmt.Printf(msg+"\n", h.Version, id)
}

View File

@ -1,3 +1,3 @@
Header: Version: 2, Id: 8932adf303fe0289679d47fa84d2b241
Header: Version: 2, Id: 8932adf303fe0289679d47fa84d2b241, assuming AES-GCM mode
Block 0: IV: c8536b4bfd92f5dc3c1e2ac29f116d4a, Tag: 22b20422749b2f4bba67ec7d3bb1ac34, Offset: 18 Len: 4128
Block 1: IV: 2de68f4965779bb137ef2b3c20453556, Tag: 3e8758d6872234b1fffab2504e623467, Offset: 4146 Len: 936