Masked input implementation