Skip to content
Snippets Groups Projects
Commit 5b68f98a authored by Taras's avatar Taras
Browse files

Add fromBCryptPassphrase

parent 002b7dfd
No related branches found
No related tags found
No related merge requests found
...@@ -49,17 +49,8 @@ data class RawBytesKeySpec( ...@@ -49,17 +49,8 @@ data class RawBytesKeySpec(
} }
} }
fun fromPassphrase(passphrase: String, salt: String, iterations: Int, fun fromBCryptPassphrase(passphrase: String, salt: String, iterations: Int): RawBytesKeySpec {
progressListener: ProgressListener?, isBsSpeke: Boolean = false): RawBytesKeySpec { return RawBytesKeySpec(BCryptManager.retrievePrivateKeyWithPassword(passphrase, salt, iterations))
return RawBytesKeySpec(
privateKey = if (isBsSpeke) BCryptManager.retrievePrivateKeyWithPassword(passphrase, salt, iterations)
else deriveKey(
passphrase,
salt,
iterations,
progressListener
)
)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment