java.lang.Object
com.aquima.interactions.foundation.security.cert.RsaAesKeySet
All Implemented Interfaces:
Serializable

public final class RsaAesKeySet extends Object implements Serializable
The RsaAesKeySet keeps tracks of an asymmetric RSA public and private key and an AES key
Since:
17.1
See Also:
  • Constructor Details

    • RsaAesKeySet

      public RsaAesKeySet(RsaX509Key key)
      Create a new key set with a public key only.
      Parameters:
      key - A X509 compatible public key
      Throws:
      CryptoGraphicException - When the key parameter is missing
    • RsaAesKeySet

      public RsaAesKeySet(AesKey secretKey)
      Create a certificate set with related private certificate.
      Parameters:
      secretKey - secretCertificate AES secret certificate.
      Throws:
      CryptoGraphicException - When the parameter is missing
    • RsaAesKeySet

      public RsaAesKeySet(RsaX509Key publicKey, RsaPKCS8Key privateKey)
      Create a key set with related public and private key.
      Parameters:
      publicKey - A X509 compatible public key
      privateKey - A PKC8 compatible private key
      Throws:
      CryptoGraphicException - When one or more parameters are missing
    • RsaAesKeySet

      public RsaAesKeySet(RsaX509Key publicKey, RsaPKCS8Key privateKey, AesKey secretKey)
      Create a key set with related public and private key.
      Parameters:
      publicKey - A X509 compatible public key
      privateKey - A PKCS8 compatible private key
      secretKey - AES secret key.
      Throws:
      CryptoGraphicException - When one or more parameters are missing
    • RsaAesKeySet

      public RsaAesKeySet(RsaX509Key publicKey, AesKey secretKey)
      Create a key set with related public and private key.
      Parameters:
      publicKey - A X509 compatible public key
      secretKey - AES secret key.
      Throws:
      CryptoGraphicException - When one or more parameters are missing
  • Method Details

    • getPrivateKey

      public RsaPKCS8Key getPrivateKey()
      Get the private key if present.
      Returns:
      RsaPKCS8Key. This method may return null
    • getPublicKey

      public RsaX509Key getPublicKey()
      Get the public key.
      Returns:
      RsaX509Key
    • getSecretKey

      public AesKey getSecretKey()
      Get the secret key.
      Returns:
      AesKey