National Identifier Mask  Canada  Social Insurance Number (SIN)
The SIN consists of 9 digits which are typically grouped as 3 digits separated by hyphens as shown in the example below:
123456789
The last digit is a check digit calculated using the Luhn algorithm.
Format
FileMasker masks the digits of a SIN value and preserves the original format of every individual SIN value. All nonnumeric characters are preserved.
For example, rows that have hyphen separated SIN numbers are masked using the same hyphen separated format while other rows that are space separated are masked with space separated values.
NULL
NULL values are preserved.
Invalid SIN values
A SIN shall be considered invalid if any of the following are true: * The original value does not contain exactly 9 digits (plus any other symbols such as hyphens or spaces for formatting). * The first digit is a 0 or 8 unless the corresponding '0/8 is valid as first digit' mask option is enabled. * The check digit is not valid.
Deterministic mode
In deterministic mode, the masked SIN values shall be generated consistently and distinctly. This means that the same masked SIN value shall be generated for all instances of a given original SIN value whenever the masking project is run provided that the same deterministic seed value is used and the mask configuration is not changed. Distinctness means that the mapping of original to masked SIN's is onetoone (no collisions).
Preserve first digit
If this checkbox is selected then the first digit of the original SIN shall be preserved.
If this checkbox is not selected then the first digit (Prefix) shall be chosen randomly and weighted according to the approximate population distribution of Canada in 2012. This translates to the Prefix selection probability distribution as shown below:
If the '0' is valid as first digit and/or '8' is valid as first digit options are enabled then these prefixes (0, 8) shall share in the 1% probability that is assigned to the Temporary Residents prefix (9).
'0' is valid as first digit
If this checkbox is selected then a '0' as the first digit of the original SIN value shall be considered valid. Otherwise the SIN value shall be considered invalid.
'8' is valid as first digit
If this checkbox is selected then an '8' as the first digit of the original SIN value shall be considered valid. Otherwise the SIN value shall be considered invalid.
Preserve invalid SIN's
If this checkbox is selected then invalid SIN's shall be preserved.
NonDeterministic mode
In nondeterministic mode, FileMasker shall generate a sequence of SINs composed of 3 parts:
{PrefixDigit} {SequenceNumber} {CheckDigit}
Preserve first digit
This parameter has the same effect in nondeterministic mode as in deterministic mode. See the parameter description above.
'0' is valid as first digit
This parameter has the same effect in nondeterministic mode as in deterministic mode. See the parameter description above.
'8' is valid as first digit
This parameter has the same effect in nondeterministic mode as in deterministic mode. See the parameter description above.
Preserve invalid SIN's
This parameter has the same effect in nondeterministic mode as in deterministic mode. See the parameter description above.
Start sequence number
This specifies the first number that shall be used as {SequenceNumber} and shall be incremented by 1.
NULLs and Empty Strings
NULLs and empty strings are always preserved.
