code: func (ssa *SQLStorageAuthority) GetRegistrationByKey(ctx context.Context, key *jose.JSONWebKey) (core.Registration, error) {
  	const query = "WHERE jwk_sha256 = ?"
  	if key == nil {
  		return core.Registration{}, fmt.Errorf("key argument to GetRegistrationByKey must not be nil")
  	}
  	sha, err := core.KeyDigest(key.Key)
  	if err != nil {
  		return core.Registration{}, err
  	}
  	model, err := selectRegistration(ssa.dbMap.WithContext(ctx), query, sha)
  	if err == sql.ErrNoRows {
  		return core.Registration{}, berrors.NotFoundError("no registrations with public key sha256 %q", sha)
  	}
  	if err != nil {
  		return core.Registration{}, err
  	}
  
  	return modelToRegistration(model)
  }
docs: // GetRegistrationByKey obtains a Registration by JWK