Class Pem.Encryption

  • All Implemented Interfaces:
    AutoCloseable
    Enclosing class:
    Pem

    public static class Pem.Encryption
    extends Object
    Configures how private keys are encrypted
    • Constructor Detail

      • Encryption

        public Encryption​(String algorithm,
                          int keySize,
                          byte[] iv,
                          String blockMode,
                          Pem.Passphrase passphrase,
                          boolean ownsPassphrase)
    • Method Detail

      • none

        public static Pem.Encryption none()
        Constant representing the absence of encryption
        Returns:
        Encryption instance
      • algorithm

        public String algorithm()
        The encryption algorithm
        Returns:
        Encryption algorithm name
      • keySize

        public int keySize()
        The key size
        Returns:
        Key size in bits
      • iv

        public byte[] iv()
        The initialization vector
        Returns:
        Initialization vector
      • blockMode

        public String blockMode()
        The block mode
        Returns:
        The block mode name
      • passphrase

        public Pem.Passphrase passphrase()
        The encryption passphrase
        Returns:
        The passphrase