add lock in encryption; #32