Class SecretSubkeyPacket

    • Constructor Detail

      • SecretSubkeyPacket

        public SecretSubkeyPacket​(PublicKeyPacket pubKeyPacket,
                                  int encAlgorithm,
                                  S2K s2k,
                                  byte[] iv,
                                  byte[] secKeyData)
        Create a secret subkey packet. If the encryption algorithm is NOT SymmetricKeyAlgorithmTags.NULL, the SecretKeyPacket.USAGE_SHA1 will be used as S2K usage, otherwise the key will be unencrypted (SecretKeyPacket.USAGE_NONE).
        Parameters:
        pubKeyPacket - public subkey packet
        encAlgorithm - encryption algorithm
        s2k - s2k identifier
        iv - optional iv for the encryption algorithm
        secKeyData - secret key data
      • SecretSubkeyPacket

        public SecretSubkeyPacket​(PublicKeyPacket pubKeyPacket,
                                  int encAlgorithm,
                                  int s2kUsage,
                                  S2K s2k,
                                  byte[] iv,
                                  byte[] secKeyData)
        Create a secret subkey packet.
        Parameters:
        pubKeyPacket - public subkey packet
        encAlgorithm - encryption algorithm
        s2kUsage - s2k usage
        s2k - s2k identifier
        iv - optional iv for the encryption algorithm
        secKeyData - secret key data
      • SecretSubkeyPacket

        public SecretSubkeyPacket​(PublicKeyPacket pubKeyPacket,
                                  int encAlgorithm,
                                  int aeadAlgorithm,
                                  int s2kUsage,
                                  S2K s2K,
                                  byte[] iv,
                                  byte[] secKeyData)
        Create a secret subkey packet.
        Parameters:
        pubKeyPacket - public subkey packet
        encAlgorithm - encryption algorithm
        aeadAlgorithm - aead algorithm
        s2kUsage - s2k usage
        s2K - s2k identifier
        iv - optional iv for the AEAD algorithm or encryption algorithm
        secKeyData - secret key data