Skip to content

Commit b148094

Browse files
authored
Merge pull request #56 from PanosSakkos/patch-1
Update README.md
2 parents 0e2d157 + 505efa2 commit b148094

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
@@ -102,10 +102,10 @@ assert(hmacs5! == expectedRFC2202)
102102
var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c")
103103
var plainText = "The quick brown fox jumps over the lazy dog. The fox has more or less had it at this point."
104104

105-
var cryptor = Cryptor(operation:.Encrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
105+
var cryptor = Cryptor(operation:.encrypt, algorithm:.aes, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
106106
var cipherText = cryptor.update(plainText)?.final()
107107

108-
cryptor = Cryptor(operation:.Decrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
108+
cryptor = Cryptor(operation:.decrypt, algorithm:.aes, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
109109
var decryptedPlainText = cryptor.update(cipherText!)?.final()
110110
var decryptedString = decryptedPlainText!.reduce("") { $0 + String(UnicodeScalar($1)) }
111111
decryptedString

0 commit comments

Comments
 (0)