java.lang.Object
org.elasticsearch.xpack.core.watcher.crypto.CryptoService

public class CryptoService extends Object
Service that provides cryptographic methods based on a shared system key
  • Field Details

  • Constructor Details

  • Method Details

    • encrypt

      public char[] encrypt(char[] chars)
      Encrypts the provided char array and returns the encrypted values in a char array
      Parameters:
      chars - the characters to encrypt
      Returns:
      character array representing the encrypted data
    • decrypt

      public char[] decrypt(char[] chars)
      Decrypts the provided char array and returns the plain-text chars
      Parameters:
      chars - the data to decrypt
      Returns:
      plaintext chars
    • isEncrypted

      protected static boolean isEncrypted(char[] chars)
      Checks whether the given chars are encrypted
      Parameters:
      chars - the chars to check if they are encrypted
      Returns:
      true is data is encrypted
    • addSettings

      public static void addSettings(List<Setting<?>> settings)