stringIdToXdrHash static method

XdrHash stringIdToXdrHash(
  1. String strId
)

Implementation

static XdrHash stringIdToXdrHash(String strId) {
  Uint8List bytes = Util.hexToBytes(strId.toUpperCase());
  if (bytes.length < 32) {
    bytes = Util.paddedByteArray(bytes, 32);
  } else if (bytes.length > 32) {
    bytes = bytes.sublist(bytes.length - 32, bytes.length);
  }

  return XdrHash(bytes);
}