Skip to content

Commit 467cc1f

Browse files
authored
Merge pull request #58 from PanosSakkos/patch-1
Updated cryptor examples
2 parents b148094 + 159fa5b commit 467cc1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ var encryptedFileOutputStream = NSOutputStream(toFileAtPath: encryptedFilePath,
166166
var encryptedFileInputStream = NSInputStream(fileAtPath: encryptedFilePath)
167167
var decryptedFileOutputStream = NSOutputStream(toFileAtPath: decryptedFilePath, append:false)
168168

169-
var sc = StreamCryptor(operation:.Encrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
169+
var sc = StreamCryptor(operation:.encrypt, algorithm:.aes, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
170170
crypt(sc, imageInputStream, encryptedFileOutputStream, 1024)
171171

172172
// Uncomment this line to verify that the file is encrypted
173173
//var encryptedImage = UIImage(contentsOfFile:encryptedFile)
174174

175-
sc = StreamCryptor(operation:.Decrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
175+
sc = StreamCryptor(operation:.decrypt, algorithm:.aes, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
176176
crypt(sc, encryptedFileInputStream, decryptedFileOutputStream, 1024)
177177

178178
var image = UIImage(named:"Riscal.jpg")

0 commit comments

Comments
 (0)