Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion IDZSwiftCommonCrypto.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "IDZSwiftCommonCrypto"
s.version = "0.7.0"
s.version = "0.7.1"
s.summary = "A wrapper for Apple's Common Crypto library written in Swift."

s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto"
Expand Down
2 changes: 1 addition & 1 deletion IDZSwiftCommonCrypto/HMAC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public class HMAC : Updateable
/// - parameter algorithm: selects the algorithm
/// - parameter key: specifies the key
///
init(algorithm : Algorithm, key : String)
public init(algorithm : Algorithm, key : String)
{
self.algorithm = algorithm
CCHmacInit(context, algorithm.nativeValue(), key, size_t(key.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)))
Expand Down
4 changes: 4 additions & 0 deletions IDZSwiftCommonCryptoTestApp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func test_StreamCryptor_AES_ECB() {
//assert(byteCount == 0, "Final byte count is 0")
assert(expectedCipherText.count == cipherText.count , "Counts are as expected")
assert(expectedCipherText == cipherText, "Obtained expected cipher text")

// Probing https://github.com/iosdevzone/IDZSwiftCommonCrypto/issues/13
let hmac = HMAC(algorithm: .SHA256, key: "secret_key").update("content")?.final() ?? []
print(hexStringFromArray(hmac))
}

@UIApplicationMain
Expand Down