浏览代码

Update example use of Authenticators (Poly1305, HMAC) #320

Marcin Krzyzanowski 9 年之前
父节点
当前提交
c3be1aae41
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      README.md

+ 2 - 2
README.md

@@ -206,8 +206,8 @@ let hash = "123".md5()
 
 ```swift
 // Calculate Message Authentication Code (MAC) for message
-let mac: Array<UInt8> = try! Authenticator.Poly1305(key: key).authenticate(message)
-let hmac: Array<UInt8> = try! Authenticator.HMAC(key: key, variant: .sha256).authenticate(message)
+let mac: Array<UInt8> = try! Poly1305(key: key).authenticate(bytes)
+let hmac: Array<UInt8> = try! HMAC(key: key, variant: .sha256).authenticate(bytes)
 ```
 
 #####Password-Based Key Derivation Function