aboutsummaryrefslogtreecommitdiff
path: root/crypto-pgpainless/src
diff options
context:
space:
mode:
Diffstat (limited to 'crypto-pgpainless/src')
-rw-r--r--crypto-pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPSessionKey.kt16
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto-pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPSessionKey.kt b/crypto-pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPSessionKey.kt
new file mode 100644
index 00000000..42055cb4
--- /dev/null
+++ b/crypto-pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPSessionKey.kt
@@ -0,0 +1,16 @@
+package app.passwordstore.crypto
+
+import org.bouncycastle.openpgp.PGPPublicKey
+import org.bouncycastle.openpgp.PGPSessionKey
+import org.pgpainless.algorithm.PublicKeyAlgorithm
+
+public class PGPEncryptedSessionKey(
+ public val publicKey: PGPPublicKey,
+ public val algorithm: PublicKeyAlgorithm,
+ public val contents: ByteArray
+)
+
+public fun PGPSessionKey(
+ algorithm: PublicKeyAlgorithm,
+ sessionKey: ByteArray
+): PGPSessionKey = PGPSessionKey(algorithm.algorithmId, sessionKey)