Merge pull request #3956 from shelib01/aes_masking_fix

AES masking bug fix