Enum Class CryptoKeyType

java.lang.Object
java.lang.Enum<CryptoKeyType>
org.stellar.sdk.xdr.CryptoKeyType
All Implemented Interfaces:
Serializable, Comparable<CryptoKeyType>, Constable, XdrElement

public enum CryptoKeyType extends Enum<CryptoKeyType> implements XdrElement
CryptoKeyType's original definition in the XDR file is:
 enum CryptoKeyType
 {
     KEY_TYPE_ED25519 = 0,
     KEY_TYPE_PRE_AUTH_TX = 1,
     KEY_TYPE_HASH_X = 2,
     KEY_TYPE_ED25519_SIGNED_PAYLOAD = 3,
     // MUXED enum values for supported type are derived from the enum values
     // above by ORing them with 0x100
     KEY_TYPE_MUXED_ED25519 = 0x100
 };
 
  • Enum Constant Details

    • KEY_TYPE_ED25519

      public static final CryptoKeyType KEY_TYPE_ED25519
    • KEY_TYPE_PRE_AUTH_TX

      public static final CryptoKeyType KEY_TYPE_PRE_AUTH_TX
    • KEY_TYPE_HASH_X

      public static final CryptoKeyType KEY_TYPE_HASH_X
    • KEY_TYPE_ED25519_SIGNED_PAYLOAD

      public static final CryptoKeyType KEY_TYPE_ED25519_SIGNED_PAYLOAD
    • KEY_TYPE_MUXED_ED25519

      public static final CryptoKeyType KEY_TYPE_MUXED_ED25519
  • Method Details

    • values

      public static CryptoKeyType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CryptoKeyType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
    • decode

      public static CryptoKeyType decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

      public static CryptoKeyType decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      Parameters:
      stream - the destination XDR output stream
      Throws:
      IOException - if an I/O error occurs while writing the value
    • fromXdrBase64

      public static CryptoKeyType fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static CryptoKeyType fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static CryptoKeyType fromJson(String json)