in image/image.go [818:839]
func (img *Image) HasEncryptionPayload() bool {
enc := false
res, _ := img.FindAllUniqueTlv(IMAGE_TLV_SECRET_ID_LEGACY)
if res != nil {
nonce, _ := img.FindAllUniqueTlv(IMAGE_TLV_AES_NONCE_LEGACY)
if nonce != nil {
enc = true
}
}
if !enc {
res, _ = img.FindAllUniqueTlv(IMAGE_TLV_SECRET_ID)
if res != nil {
nonce, _ := img.FindAllUniqueTlv(IMAGE_TLV_AES_NONCE)
if nonce != nil {
enc = true
}
}
}
return enc
}