-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Milestone
Description
Hi @whyoleg,
thank you very much for this awesome library. I am using snapshot version to convert my webpush library to multiplatform.
I transformed code from Java Security APIs without issues (using your new ECDH support), but one think I can't find a way to do is this last function:
internal fun encryptAesGcmNoPadding(key: ByteArray, nonce: ByteArray, payload: ByteArray): ByteArray {
//return CryptographyProvider.Default
// .get(AES.GCM)
// .keyDecoder()
// .decodeFromBlocking(AES.Key.Format.RAW, key)
// .cipher()
// .encryptBlocking(nonce, payload)
return Cipher.getInstance("AES/GCM/NoPadding").run {
init(Cipher.ENCRYPT_MODE, SecretKeySpec(key, "AES"), GCMParameterSpec(128, nonce))
doFinal(payload)
}
}Can you please help me?
Metadata
Metadata
Assignees
Labels
No labels