Skip to content

Commit

Permalink
Merge pull request #50 from henrinormak/readme-update
Browse files Browse the repository at this point in the history
Update README for Swift 3
  • Loading branch information
jorystiefel authored Oct 12, 2016
2 parents a4249e8 + 4fd2c6b commit 8655f99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Furthermore, Heimdall also helps maintain the public-private RSA key-pair in Key

## Requirements

Heimdall requires Swift 2 and works with only Xcode 7 and above
Heimdall requires Swift 3 and works with only Xcode 8 and above

## Installation

Expand Down Expand Up @@ -137,12 +137,12 @@ First step is to share your public key with another party:
let localHeimdall = Heimdall(tagPrefix: "com.example")
if let heimdall = localHeimdall, publicKeyData = heimdall.publicKeyDataX509() {

var publicKeyString = publicKeyData.base64EncodedStringWithOptions(.allZeros)
var publicKeyString = publicKeyData.base64EncodedString()

// If you want to make this string URL safe,
// you have to remember to do the reverse on the other side later
publicKeyString = publicKeyString.stringByReplacingOccurrencesOfString("/", withString: "_")
publicKeyString = publicKeyString.stringByReplacingOccurrencesOfString("+", withString: "-")
publicKeyString = publicKeyString.replacingOccurrences(of: "/", with: "_")
publicKeyString = publicKeyString.replacingOccurrences(of: "+", with: "-")

println(publicKeyString) // Something along the lines of "MIGfMA0GCSqGSIb3DQEBAQUAA..."

Expand Down

0 comments on commit 8655f99

Please sign in to comment.