Skip to content

Commit

Permalink
dumps(key: String, ...) now has mandatory key
Browse files Browse the repository at this point in the history
  • Loading branch information
stannie committed Apr 10, 2015
1 parent 7984428 commit 3438feb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions SwiftJWT.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,8 @@ public class JWT {
}

// helper function for plain strings as key
public func dumps(key: String?, jti_len: UInt = 16, error: NSErrorPointer = nil) -> String? {
var key_raw: NSData? = nil
if let key_str = key {
key_raw = key_str.dataUsingEncoding(NSUTF8StringEncoding)!
}
public func dumps(key: String, jti_len: UInt = 16, error: NSErrorPointer = nil) -> String? {
let key_raw = key.dataUsingEncoding(NSUTF8StringEncoding)!
return dumps(key: key_raw, jti_len: jti_len, error: error)
}

Expand Down

0 comments on commit 3438feb

Please sign in to comment.