Class CryptUtils

java.lang.Object
org.elasticsearch.license.CryptUtils

public class CryptUtils extends Object
  • Constructor Details

    • CryptUtils

      public CryptUtils()
  • Method Details

    • readEncryptedPrivateKey

      public static PrivateKey readEncryptedPrivateKey(byte[] fileContents)
      Read encrypted private key file content with default pass phrase
    • writeEncryptedPrivateKey

      public static byte[] writeEncryptedPrivateKey(PrivateKey privateKey)
      Returns encrypted private key file content with default pass phrase
    • readEncryptedPrivateKey

      public static PrivateKey readEncryptedPrivateKey(byte[] fileContents, char[] passPhrase, boolean preV4)
      Read encrypted private key file content with provided passPhrase
    • readPublicKey

      public static PublicKey readPublicKey(byte[] fileContents)
      Read public key file content
    • writeEncryptedPublicKey

      public static byte[] writeEncryptedPublicKey(PublicKey publicKey)
      Returns encrypted public key file content with provided passPhrase
    • writeEncryptedPrivateKey

      public static byte[] writeEncryptedPrivateKey(PrivateKey privateKey, char[] passPhrase)
      Returns encrypted private key file content with provided passPhrase