ShortFuse

joined 1 year ago
[–] ShortFuse@lemmy.world 5 points 1 month ago* (last edited 1 month ago)

Nice riposte, OP.

[–] ShortFuse@lemmy.world 2 points 1 month ago* (last edited 1 month ago)

Either do a left join and repeat all the post values for every tag or do two round-trip queries and manually join them in code.

JSON_ARRAYAGG. You'll get the object all tidied up by database in one trip with no need to manipulate on the receiving client.

I recently tried MariaDB for a project and it was kinda neat, having only really messed with DynamoDB and 2012 era MsSQL. All the modern SQL languages support it, though MariaDB and MySQL don't exactly follow the spec.

[–] ShortFuse@lemmy.world 2 points 1 month ago (2 children)

When I document code I have this problem with indices vs indexes.

[–] ShortFuse@lemmy.world 27 points 1 month ago (1 children)

I heard people used to just float around before Newton invented gravity.

But I'm not sure. I think that's just hot air.

[–] ShortFuse@lemmy.world 20 points 1 month ago (2 children)

Officials said that at the police station, Love admitted to being involved in the attack and said he had become acquainted with the victim beforehand.

"The defendant added he was possibly drugged and someone inserted an unknown object in his rectum," the report says. "Although the defendant is not certain the victim is responsible for this, the defendant made a statement indicating he needed to hurt whoever hurt him and was prompted to purchase the knife at a Target store near Miami International Airport."

[–] ShortFuse@lemmy.world 13 points 1 month ago
[–] ShortFuse@lemmy.world 14 points 1 month ago* (last edited 1 month ago)

Yeah, except for the first few bytes. PKCS8 has some initial header information, but most of it is the OCTET_STRING of the private key itself.

The PEM (human "readable") version is Base64, so you can craft up a string and make that your key. DER is that converted to binary again:

/**
 * @see https://datatracker.ietf.org/doc/html/rfc5208#section-5
 * @see https://datatracker.ietf.org/doc/html/rfc2313#section-11
 * Unwraps PKCS8 Container for internal key (RSA or EC)
 * @param {string|Uint8Array} pkcs8
 * @param {string} [checkOID]
 * @return {Uint8Array} DER
 */
export function privateKeyFromPrivateKeyInformation(pkcs8, checkOID) {
  const der = derFromPrivateKeyInformation(pkcs8);
  const [
    [privateKeyInfoType, [
      [versionType, version],
      algorithmIdentifierTuple,
      privateKeyTuple,
    ]],
  ] = decodeDER(der);
  if (privateKeyInfoType !== 'SEQUENCE') throw new Error('Invalid PKCS8');
  if (versionType !== 'INTEGER') throw new Error('Invalid PKCS8');
  if (version !== 0) throw new Error('Unsupported PKCS8 Version');
  const [algorithmIdentifierType, algorithmIdentifierValues] = algorithmIdentifierTuple;
  if (algorithmIdentifierType !== 'SEQUENCE') throw new Error('Invalid PKCS8');
  const [privateKeyType, privateKey] = privateKeyTuple;
  if (privateKeyType !== 'OCTET_STRING') throw new Error('Invalid PKCS8');
  if (checkOID) {
    for (const [type, value] of algorithmIdentifierValues) {
      if (type === 'OBJECT_IDENTIFIER' && value === checkOID) {
        return privateKey;
      }
    }
    return null; // Not an error, just doesn't match
  }

  return privateKey;
}

I wrote a "plain English" library in Javascript to demystify all the magic of Let's Encrypt, ACME, and all those certificates. (Also to spin up my own certs in NodeJS/Chrome).

https://github.com/clshortfuse/acmejs/blob/96fcbe089f0f949f9eb6830ed2d7bc257ea8dc32/utils/certificate/privateKeyInformation.js#L40

Edit: To be specific, PKCS8 is usually a PKCS1 (RSA) key with some wrapping to identify it (the OID). The integers (BigInts) you pick for RSA would have to line up in some way, but I would think it's doable. At worst there is maybe a character or two of garbage at the breakpoints for the RSA integers. And if you account for which ones are absent in the public key, then anybody reading it could get a kick out of reading your public certificate.

[–] ShortFuse@lemmy.world 3 points 2 months ago* (last edited 2 months ago)

No. Microsoft is not liable, at least when it applies to HIPAA.

The HIPAA Rules apply to covered entities and business associates.

Individuals, organizations, and agencies that meet the definition of a covered entity under HIPAA must comply with the Rules' requirements to protect the privacy and security of health information and must provide individuals with certain rights with respect to their health information. If a covered entity engages a business associate to help it carry out its health care activities and functions, the covered entity must have a written business associate contract or other arrangement with the business associate that establishes specifically what the business associate has been engaged to do and requires the business associate to comply with the Rules’ requirements to protect the privacy and security of protected health information. In addition to these contractual obligations, business associates are directly liable for compliance with certain provisions of the HIPAA Rules.

If an entity does not meet the definition of a covered entity or business associate, it does not have to comply with the HIPAA Rules. See definitions of “business associate” and “covered entity” at 45 CFR 160.103.

https://www.hhs.gov/hipaa/for-professionals/covered-entities/index.html

[–] ShortFuse@lemmy.world 18 points 2 months ago* (last edited 2 months ago) (7 children)

HIPAA doesn't even require encryption. It's considered "addressable". They just require access be "closed". You can be HIPAA compliant with just Windows login, event viewer, and notepad.

(Also HIPAA applies to healthcare providers. Adobe doesn't need to follow HIPAA data protection, though they probably do because it's so lax, just because you uploaded a PDF of a medical bill to their cloud.)

[–] ShortFuse@lemmy.world 52 points 2 months ago* (last edited 2 months ago) (1 children)

Burn-in is a misnomer.

OLEDs don't burn their image into anything. CRTs used to burn in right onto the screen making it impossible to fix without physically changing the "glass" (really the phosphor screen).

What happens is the OLED burns out unevenly, causing some areas to be weaker than others. That clearly shows when you try to show all the colors (white) because some areas can no longer get as bright as their neighboring areas. It is reminiscent of CRT burn-in. LCDs just have one big backlight (or multiple if they have zones) so unevenness from burnout in LCDs is rarely seen, though still a thing.

So, OLED manufacturers do things to avoid areas from burning out from staying on for too long like pixel shifting, reducing refresh rate, or dimming areas that don't change for a long time (like logos).

There is a secondary issue that looks like burn-in which is the panel's ability to detect how long a pixel has been lit. If it can't detect properly, then it will not give an even image. This is corrected every once in a while with "compensation cycles" but some panels are notorious for not doing them (Samsung), but once you do, it removes most commonly seen "burn-in".

You'd have to really, really leave the same image on your screen for months for it to have any noticeable in real world usage, at least with modern OLED TVs. You would normally worry more about the panel dimming too much over a long period of time, but I don't believe lifetime is any worse than standard LCD.

TL;DR: Watch RTings explain it

[–] ShortFuse@lemmy.world 28 points 2 months ago* (last edited 2 months ago) (1 children)

The Bellamy Salute was pretty much the same. The Pledge of Allegiance was done with it. It was changed to the hand over heart style in 1942.

https://en.wikipedia.org/wiki/Bellamy_salute

[–] ShortFuse@lemmy.world 2 points 2 months ago* (last edited 2 months ago)
view more: ‹ prev next ›