credentialIdToBytes32Hex method

  1. @override
String credentialIdToBytes32Hex(
  1. List<int> credentialId
)
override

Converts a credentialId to a 32-byte hex string.

  • credentialId: The credentialId to convert.

Returns a 32-byte hex string.

Implementation

@override
String credentialIdToBytes32Hex(List<int> credentialId) {
  require(credentialId.length <= 32, "exception: credentialId too long");
  while (credentialId.length < 32) {
    credentialId.insert(0, 0);
  }
  return hexlify(credentialId);
}