This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // AesGcmEncryptor.h | |
| // | |
| // Created by Hamidreza Seifolahi on 12/13/21. | |
| // Copyright © 2021 AsanPardakht. All rights reserved. | |
| // | |
| #import <CommonCrypto/CommonCryptor.h> | |
| NS_ASSUME_NONNULL_BEGIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension String { | |
| func IRIDCheck() -> Bool { | |
| var sum = 0 | |
| var controlDigit = -1 | |
| let characters = self.characters.reversed().map { String($0) } | |
| for (idx, element) in characters.enumerated() { | |
| guard let digit = Int(element) else { return false } | |
| if(idx == 0){ |