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 Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "slauth"
version = "0.7.17"
version = "0.7.18"
authors = [
"richer <richer.arc@gmail.com>",
"LucFauvel <luc.fauvel@hotmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion Slauth.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Slauth'
s.version = '0.7.17'
s.version = '0.7.18'
s.summary = 'A Swift wrapper around Slauth Rust crate'
s.description = <<-DESC
TODO: Add long description of the pod here.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ properties.load(project.rootProject.file('local.properties').newDataInputStream(

project('slauth') {
ext {
libraryVersion = '0.7.17'
libraryVersion = '0.7.18'
}
publishing {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion wrappers/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "0.7.17"
versionName "0.7.18"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
17 changes: 17 additions & 0 deletions wrappers/swift/classes/SlauthUtils.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Foundation

public class SlauthUtils {
public static func convertPkcs8ToPrivateKey(pkcs8String: String) -> String {
let cString = pkcs8_to_custom_private_key(pkcs8String)
let privateKey = String(cString: cString!)
free(cString)
return privateKey
}

public static func convertPrivateKeyToPkcs8(privateKey: String) -> String {
let cString = private_key_to_pkcs8_der(privateKey)
let pkcs8String = String(cString: cString!)
free(cString)
return pkcs8String
}
}
14 changes: 0 additions & 14 deletions wrappers/swift/classes/WebAuthnCreationResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,6 @@ public class WebAuthnCreationResponse: NSObject {
return privateKey
}

public func convertPkcs8ToPrivateKey(pkcs8String: String) -> String {
let cString = pkcs8_to_custom_private_key(pkcs8String)
let privateKey = String(cString: cString!)
free(cString)
return privateKey
}

public func convertPrivateKeyToPkcs8(privateKey: String) -> String {
let cString = private_key_to_pkcs8_der(privateKey)
let pkcs8String = String(cString: cString!)
free(cString)
return pkcs8String
}

public func getAttestationObject() -> Data {
let buffer = get_attestation_object_from_response(self.raw)
return Data(bytes: buffer.data, count: Int(buffer.len))
Expand Down