You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to use your library to create and use public keys from another device that is using the X509 protocol. However I was attempting to create a heimdall object with just a tag so that I could ensure that it works, i instantiated like so:
if let heimdall = Heimdall(publicTag: "com.1066203")
however it returns null, I tried different tags and only a few times could I actually create the object (could not decipher which ones worked because they would not work if ran again). However when I did create the object the encryption method also returned false, I tried to regenerate the key as well. implemented like so:
let testString = "This is a test string"
heimdall.regenerate(1024)
// Encryption/Decryption
if let encryptedString = heimdall.encrypt(testString) {
print(encryptedString) // "cQzaQCQLhAWqkDyPoHnPrpsVh..."
if let decryptedString = heimdall.decrypt(encryptedString) {
print(decryptedString) // "This is a test string"
} else
{
print("did not decrypt")
}
} else
{
print("did not encrypt")
}
Using breakpoints and the debugger I narrowed it down to the method:
private class func obtainKeyData(tag: String) -> NSData?
always returning nil, and I could not figure out why that is the case. I am relatively new to iOS so hopefully I am just doing something wrong but if not i'd appreciate you taking a look and seeing what could be going wrong. If you would like any other information I will happily give it
The text was updated successfully, but these errors were encountered:
Hello,
I have been trying to use your library to create and use public keys from another device that is using the X509 protocol. However I was attempting to create a heimdall object with just a tag so that I could ensure that it works, i instantiated like so:
if let heimdall = Heimdall(publicTag: "com.1066203")
however it returns null, I tried different tags and only a few times could I actually create the object (could not decipher which ones worked because they would not work if ran again). However when I did create the object the encryption method also returned false, I tried to regenerate the key as well. implemented like so:
let testString = "This is a test string"
heimdall.regenerate(1024)
Using breakpoints and the debugger I narrowed it down to the method:
private class func obtainKeyData(tag: String) -> NSData?
always returning nil, and I could not figure out why that is the case. I am relatively new to iOS so hopefully I am just doing something wrong but if not i'd appreciate you taking a look and seeing what could be going wrong. If you would like any other information I will happily give it
The text was updated successfully, but these errors were encountered: