One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| mr Marathi | |
| bs Bosnian | |
| ee_TG Ewe (Togo) | |
| ms Malay | |
| kam_KE Kamba (Kenya) | |
| mt Maltese | |
| ha Hausa | |
| es_HN Spanish (Honduras) | |
| ml_IN Malayalam (India) | |
| ro_MD Romanian (Moldova) |
| import { object, string, number, ValidationError } from '@hapi/joi'; | |
| const schema = object({ | |
| searchCode: string() | |
| .required() | |
| .label('Search code'), | |
| id: number().required() | |
| }), | |
| messages = { | |
| 'alternatives.all': '{{#label}} does not match all of the required types', |
| extension Data { | |
| var hexString: String { | |
| return self.reduce("", { $0 + String(format: "%02x", $1) }) | |
| } | |
| } | |
| do { | |
| let sourceData = "AES256".data(using: .utf8)! | |
| let password = "password" | |
| let salt = AES256Crypter.randomSalt() |
| protocol Randomizer { | |
| static func randomIv() -> Data | |
| static func randomSalt() -> Data | |
| static func randomData(length: Int) -> Data | |
| } | |
| protocol Crypter { | |
| func encrypt(_ digest: Data) throws -> Data | |
| func decrypt(_ encrypted: Data) throws -> Data | |
| } |