magicbox tamper-seal refactored