Add decrypt feature

This commit is contained in:
vanjatomic 2022-04-01 09:31:49 +01:00
parent d2e0f28578
commit 2826bd9263
2 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,7 @@
# because some versions here need to be matched by app authors in
# their own projects. So don't get fancy with syntax!
cordaVersion=4.8.5.17-CONCLAVE-SNAPSHOT
cordaVersion=4.8.5.18-CONCLAVE-SNAPSHOT
versionSuffix=
gradlePluginsVersion=5.0.12
kotlinVersion=1.2.71

View File

@ -6,6 +6,7 @@ import net.corda.core.conclave.common.DummyCordaEnclaveClient
import net.corda.core.conclave.common.CordaEnclaveClient
import net.corda.core.conclave.common.dto.ConclaveLedgerTxModel
import net.corda.core.conclave.common.dto.EncryptedVerifiableTxAndDependencies
import net.corda.core.conclave.common.dto.InputsAndRefsForNode
import net.corda.core.identity.CordaX500Name
import net.corda.core.internal.FlowStateMachine
import net.corda.core.serialization.SingletonSerializeAsToken
@ -54,4 +55,9 @@ class EncryptedTransactionService(val enclaveClient: CordaEnclaveClient = DummyC
fun encryptTransactionForRemote(flowId: UUID, encryptedTransaction: EncryptedTransaction, theirAttestationBytes: ByteArray): EncryptedTransaction {
return enclaveClient.encryptEncryptedTransactionForRemote(flowId, encryptedTransaction, theirAttestationBytes)
}
@Suspendable
fun decryptInputAndRefsForNode(encryptedTransaction: EncryptedTransaction): InputsAndRefsForNode {
return enclaveClient.decryptInputAndRefsForNode(encryptedTransaction)
}
}