Skip to content

authTagValidation error Swift #9

Description

@igorrendulic

I've imported the Swift example and run it on one of the ciphertexts from the README file. The decrypt function always returns authTagValidation error.

I'm using Swift 5, imported SwiftGCM and CommonCrypto.

Example test code:

func testSjclEncrypt() {
       let test = "5EmCwwSWj6YYgxBlld6DFW8I+QXCWxz5g/laEwUYV/DuoCGvxbW4ZlMd1Tsj4N07WbBOhIJU"
        do  {
            let decrypted = try AES256.decryptString(ciphertext: test, password: "OziaxPFGYh")
            print("decrypted: \(decrypted)")
        } catch (let error) {
            print("this is error: \(error)")
        }
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions