HN user

bvanheu

5 karma
Posts1
Comments9
View on HN

Windows is also a rare bird in UTF-16.

an interesting tidbit, some Windows kernel developer realized that most registry keys are ascii anyways so they could save up to 50% space simply by storing the name as ascii. The flag is called "compressed name" and they will pad with 0x00 when reading the name to make a proper utf-16 string.

I think dannyw meant something like this:

  # This function is defined by the system
  def validSignature(sig):
    return false

  # This function is defined by the system
  def isSignaturefromGuardian(sig):
    if sig.validator == "guardian":
      return true
    return false

  # A bug in the system compared both return values
  if validSignature(tx.sig) == signatureFromGuardian(tx.sig):
    approve()
```