Masking implementation