Prevent the creation of 'weak' PINs.

Simple checks to prevent the same number, or sequentially
increasing/decreasing PINs. e.g. 1111, 1234, 54321, etc.
This commit is contained in:
Alan Evans
2020-05-04 17:50:38 -03:00
committed by Greyson Parrelli
parent b7296a4fe3
commit 87eab27996
9 changed files with 287 additions and 28 deletions

View File

@@ -0,0 +1,62 @@
[
{
"name": "Empty",
"pin": "",
"valid": false
},
{
"name": "Alpha",
"pin": "abcd",
"valid": true
},
{
"name": "Sequential",
"pin": "1234",
"valid": false
},
{
"name": "Non-sequential",
"pin": "6485",
"valid": true
},
{
"name": "Sequential descending",
"pin": "43210",
"valid": false
},
{
"name": "Sequential with space",
"pin": "1234 ",
"valid": false
},
{
"name": "Non-sequential with space",
"pin": "1236 ",
"valid": true
},
{
"name": "Sequential Non-arabic digits",
"pin": "١٢٣٤٥",
"valid": false
},
{
"name": "Sequential descending Non-arabic digits",
"pin": "٥٤٣٢١",
"valid": false
},
{
"name": "Non-sequential Non-arabic digits",
"pin": "١٢٣٥٤",
"valid": true
},
{
"name": "All digits the same",
"pin": "9999",
"valid": false
},
{
"name": "All Non-arabic digits the same",
"pin": "٢٢٢٢",
"valid": false
}
]