Test code emulating password creation and share