Bug 1100945: adding a PasscodeHelper

This should do as an initial draft.
Looking forward to any kinds of feedback, especially lines 70-73 and 88-100. :)
I understand by including this file we would have a global object as this, but for convention we usually wrap it with an anonymous function, an also the consts, too.