Added support for configurable pin code length