Enum Class VoucherCanonicalBytes.NumericTagForm

java.lang.Object
java.lang.Enum<VoucherCanonicalBytes.NumericTagForm>
xyz.tcheeric.cashu.voucher.domain.VoucherCanonicalBytes.NumericTagForm
All Implemented Interfaces:
Serializable, Comparable<VoucherCanonicalBytes.NumericTagForm>, Constable
Enclosing class:
VoucherCanonicalBytes

public static enum VoucherCanonicalBytes.NumericTagForm extends Enum<VoucherCanonicalBytes.NumericTagForm>
How numeric tag values are rendered.

TRUNCATED_TO_LONG reproduces a historical defect in which every numeric tag was put through longValue(), so a ratio of 0.056 signed as 0. Vouchers issued that way are live and cannot be re-signed, because the issuer's key is not available here, so they must keep verifying until they expire. Nothing signs this way any more.

  • Enum Constant Details

  • Method Details

    • values

      public static VoucherCanonicalBytes.NumericTagForm[] 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 VoucherCanonicalBytes.NumericTagForm 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