Class JSONDecryptionDecoder

java.lang.Object
org.webpki.json.JSONDecryptionDecoder

public class JSONDecryptionDecoder extends Object
Holds parsed JEF (JSON Encryption Format) data.
  • Method Details

    • getPublicKey

      public PublicKey getPublicKey()
    • getCertificatePath

      public X509Certificate[] getCertificatePath()
    • isSharedSecret

      public boolean isSharedSecret()
    • getKeyId

      public String getKeyId()
    • getContentEncryptionAlgorithm

      public ContentEncryptionAlgorithms getContentEncryptionAlgorithm()
    • getKeyEncryptionAlgorithm

      public KeyEncryptionAlgorithms getKeyEncryptionAlgorithm()
    • getEncryptionObject

      public JSONObjectReader getEncryptionObject()
    • getDecryptedData

      public byte[] getDecryptedData(byte[] dataDecryptionKey)
      Decrypt data based on a specific symmetric key.
      Parameters:
      dataDecryptionKey - Symmetric key
      Returns:
      Decrypted data
    • getDecryptedData

      public byte[] getDecryptedData(PrivateKey privateKey)
      Decrypt data based on a specific private key.
      Parameters:
      privateKey - The private key
      Returns:
      Decrypted data
    • getDecryptedData

      public byte[] getDecryptedData(List<JSONDecryptionDecoder.DecryptionKeyHolder> decryptionKeys)
      Decrypt data based on a collection of possible [private] keys.
      Parameters:
      decryptionKeys - Collection
      Returns:
      Decrypted data