Class SigningKeyPair

java.lang.Object
org.ek9lang.core.SigningKeyPair

public final class SigningKeyPair extends Object
Just a wrapper around java public private key processing. Can hold either public key and private key, just one or none.
  • Constructor Details

    • SigningKeyPair

      public SigningKeyPair(String privateBase64, String publicBase64)
      Create a signing key pair from the private and public parts of a PKI key pair.
  • Method Details

    • generate

      public static SigningKeyPair generate(int keySize)
      Create a new signing key pair of a particular key size.
    • of

      public static SigningKeyPair of(File privateKeyFile, File publicKeyFile)
    • ofPublic

      public static SigningKeyPair ofPublic(File publicKeyFile)
    • ofPublic

      public static SigningKeyPair ofPublic(String publicBase64)
    • ofPrivate

      public static SigningKeyPair ofPrivate(File privateKeyFile)
    • ofPrivate

      public static SigningKeyPair ofPrivate(String privateBase64)
    • isPublic

      public boolean isPublic()
    • isPrivate

      public boolean isPrivate()
    • encryptWithPublicKey

      public String encryptWithPublicKey(String data)
    • encryptWithPrivateKey

      public String encryptWithPrivateKey(String data)
    • decryptWithPublicKey

      public String decryptWithPublicKey(String data)
    • decryptWithPrivateKey

      public String decryptWithPrivateKey(String data)
    • getPrivateKeyInBase64

      public String getPrivateKeyInBase64()
      Access the private key of the signing key pair.
    • getPublicKeyInBase64

      public String getPublicKeyInBase64()
      Access the public key of the signing key pair.