Class CryptoService

java.lang.Object
org.apache.druid.crypto.CryptoService

public class CryptoService extends Object
Utility class for symmetric key encryption (i.e. same secret is used for encryption and decryption) of byte[] using javax.crypto package. To learn about possible algorithms supported and their names, See https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html
  • Constructor Details

    • CryptoService

      public CryptoService(String passPhrase, @Nullable String cipherAlgName, @Nullable String cipherAlgMode, @Nullable String cipherAlgPadding, @Nullable String secretKeyFactoryAlg, @Nullable Integer saltSize, @Nullable Integer iterationCount, @Nullable Integer keyLength)
  • Method Details

    • encrypt

      public byte[] encrypt(byte[] plain)
    • decrypt

      public byte[] decrypt(byte[] data)