We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is mycode(in my project):
func testCipherString() { let str = "123456" let password = "45678" let salt = "7891" let result = str.encrypt(Cipher.aes_256_cbc, password: password, salt: salt) print("result=\(result!)") guard let str2 = result!.decrypt(Cipher.aes_256_cbc, password: password, salt: salt) else { print("str2 is nil") return } print("str2 = \(str2)") }
and the log:
result=-----BEGIN CMS----- MIAGCSqGSIb3DQEHBqCAMIACAQAwgAYJKoZIhvcNAQcBMB0GCWCGSAFlAwQBKgQQ 4cSbalm6wfgU2gmXJxgVdqCABBBzc6JwEsL221rWXM/oBz/PAAAAAAAAAAAAAA== -----END CMS----- str2 is nil
But I added my code to the PerfectCryptoTests.swift
func testCipherString() { let str = "123456" let password = "45678" let salt = "7891" let result = str.encrypt(Cipher.aes_256_cbc, password: password, salt: salt) print("result=\(result!)") guard let str2 = result!.decrypt(Cipher.aes_256_cbc, password: password, salt: salt) else { print("str2 is nil") return XCTAssert(false) } print("str2 = \(str2)") XCTAssertEqual(str, str2) }
test is ok, this log:
Test Case '-[PerfectCryptoTests.PerfectCryptoTests testCipherString]' started. result=-----BEGIN CMS----- MIAGCSqGSIb3DQEHBqCAMIACAQAwgAYJKoZIhvcNAQcBMB0GCWCGSAFlAwQBKgQQ 5/NY293XO9NMMtm4nSay7aCABBBeLr0OYPbC8WL4cziMFndeAAAAAAAAAAAAAA== -----END CMS----- str2 = 123456 Test Case '-[PerfectCryptoTests.PerfectCryptoTests testCipherString]' passed (0.052 seconds).
I do not know why,help
Thanks.
The text was updated successfully, but these errors were encountered:
You have initialise the framework once like this _ = PerfectCrypto.isInitialized
_ = PerfectCrypto.isInitialized
Sorry, something went wrong.
No branches or pull requests
this is mycode(in my project):
and the log:
But I added my code to the PerfectCryptoTests.swift
test is ok, this log:
I do not know why,help
Thanks.
The text was updated successfully, but these errors were encountered: