PCSDKModule Documentation

Enumeration PCPassword​Policy

public enum PCPasswordPolicy  

Keys password policy.

Supports 4 types:

.optional — password is optional. If user sets password the minimal password length – 6 characters.

.short — password is required. Minimal password length – 6 characters.

.longWithLetters — password is required. Minimal password length – 8 characters. Necessarily to include both - uppercase and lowercase letters.

.longWithLettersAndDigits — password is required. Minimal password length – 8 characters. Necessarily to include at least one character from each category – uppercase letters, lowercase letters and digits.

Enumeration Cases

optional

case optional

Password is optional. If user sets password the minimal password length – 6 characters.

short

case short

Password is required. Minimal password length - 6 characters

long​With​Letters

case longWithLetters

Password is required. Minimal password length - 8 characters. Necessarily to include both

  • uppercase and lowercase letters

long​With​Letters​And​Digits

case longWithLettersAndDigits

Password is required. Minimal password length - 8 characters. Necessarily to include at least one character from each category – uppercase letters, lowercase letters and digits

Methods

validate(password:​)

public func validate(password: String) -> Bool  

Validates provided password

Parameters

password String

Password to validate

Returns

true if password is valid