Class SecpFieldElementImpl

java.lang.Object
org.bitcoinj.secp.internal.SecpFieldElementImpl
All Implemented Interfaces:
Comparable<ByteArray>, ByteArray, SecpFieldElement

public class SecpFieldElementImpl extends Object implements SecpFieldElement, ByteArray
  • Constructor Details

    • SecpFieldElementImpl

      public SecpFieldElementImpl(BigInteger i)
    • SecpFieldElementImpl

      public SecpFieldElementImpl(byte[] bytes)
  • Method Details

    • toBigInteger

      public BigInteger toBigInteger()
      Description copied from interface: SecpFieldElement
      Get the field element as a BigInteger
      Specified by:
      toBigInteger in interface SecpFieldElement
      Returns:
      field element value
    • serialize

      public byte[] serialize()
      Description copied from interface: SecpFieldElement
      Get serialized field element (32 bytes unsigned)
      Specified by:
      serialize in interface SecpFieldElement
      Returns:
      serialized field element
    • isOdd

      public boolean isOdd()
      Description copied from interface: SecpFieldElement
      Get the parity of the field value
      Specified by:
      isOdd in interface SecpFieldElement
      Returns:
      true if odd, false if even
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • bytes

      public byte[] bytes()
      Description copied from interface: ByteArray
      Get the bytes as an array
      Specified by:
      bytes in interface ByteArray
      Returns:
      the bytes as an array
    • toString

      public String toString()
      Overrides:
      toString in class Object