faker.providers.ssn.en_CA

Package Contents

Classes

SsnProvider

Provider

Functions

checksum(sin)

Determine validity of a Canadian Social Insurance Number.

class faker.providers.ssn.en_CA.SsnProvider(generator: Any)

Bases: faker.providers.BaseProvider

ssn_formats: faker.providers.ElementsType[str] = ('###-##-####',)
ssn() str
faker.providers.ssn.en_CA.checksum(sin)

Determine validity of a Canadian Social Insurance Number. Validation is performed using a modified Luhn Algorithm. To check the Every second digit of the SIN is doubled and the result is summed. If the result is a multiple of ten, the Social Insurance Number is considered valid.

https://en.wikipedia.org/wiki/Social_Insurance_Number

class faker.providers.ssn.en_CA.Provider(generator: Any)

Bases: faker.providers.ssn.Provider

ssn() str