Interface CryptSessionConfig

  • All Superinterfaces:
    java.lang.AutoCloseable

    public interface CryptSessionConfig
    extends java.lang.AutoCloseable
    Interface for the encryption/decryption session config for wire protocol encryption for a specific plugin.
    Since:
    5
    Author:
    Mark Rotteveel
    • Method Detail

      • getEncryptionIdentifier

        EncryptionIdentifier getEncryptionIdentifier()
        Returns:
        Encryption identifier
      • getEncryptKey

        byte[] getEncryptKey()
        Returns:
        Encryption key
      • getDecryptKey

        byte[] getDecryptKey()
        Returns:
        Decryption key
      • getSpecificData

        byte[] getSpecificData()
        Returns:
        Plugin-specific data (can be null)
      • close

        void close()
        Clears (e.g. zeroes out) the keys and specific data
        Specified by:
        close in interface java.lang.AutoCloseable
      • symmetric

        static CryptSessionConfig symmetric​(EncryptionIdentifier encryptionIdentifier,
                                            byte[] sessionKey,
                                            byte[] specificData)
        Creates a crypt session config for a type symmetric plugin.
        Parameters:
        encryptionIdentifier - Encryption identifier of type Symmetric
        sessionKey - Session key (non-null)
        specificData - Plugin specific data (can be null)
        Returns:
        Crypt session config