Class TriggerFromChainDecryption

java.lang.Object
net.finmath.decryptionoracle.keys.demo.base.OnChainCallBase
net.finmath.decryptionoracle.keys.demo.TriggerFromChainDecryption

public class TriggerFromChainDecryption extends OnChainCallBase
Triggers a test request by calling: DummyDecryptionOracleCallback.requestDecrypt(oracle, id, encryptedKey, receiver, txNote) It generates a fresh random key (32 bytes), encrypts it with the oracle's RSA public key using OAEP(SHA-256), base64-encodes the ciphertext, and passes that as the encryptedKey. Expected off-chain decryptor: RSA/ECB/OAEPWithSHA-256AndMGF1Padding Public key PEM path is resolved in this order: 1) env ORACLE_RSA_PUBLIC_PEM 2) deployments/oracle-public.pem
Author:
Christian Fries
  • Constructor Details

    • TriggerFromChainDecryption

      public TriggerFromChainDecryption()
  • Method Details

    • main

      public static void main(String[] args) throws Exception

      main.

      Parameters:
      args - an array of String objects
      Throws:
      Exception - if any.
    • run

      public void run() throws Exception

      run.

      Throws:
      Exception - if any.
    • runDecriptionForContract

      public void runDecriptionForContract(byte[] encryptedKey, byte[] transaction) throws Exception

      runDecriptionForContract.

      Parameters:
      encryptedKey - an array of byte objects
      transaction - an array of byte objects
      Throws:
      Exception - if any.