Skip to content

Instantly share code, notes, and snippets.

View mfalt's full-sized avatar

Mattias Fält mfalt

View GitHub Profile

Goals

Syncthing devices that store data in encrypted format. Such a device can participate fully in a cluster, but the information on the device is not directly usable.

Assumptions and Definitions

  • There exists a secret key per folder, known only by devices that can access the unencrypted data. We call these "secure devices".

  • Devices that do not know the secret key can only access encrypted data. We call these "insecure devices".

@benvium
benvium / smartReadFile.php
Created September 19, 2012 12:08
PHP File to allow seeking in HTML5 <audio> tag. NOTE: I did not write this, check links in code for credits.
<?php
/**
* Reads the requested portion of a file and sends its contents to the client with the appropriate headers.
*
* This HTTP_RANGE compatible read file function is necessary for allowing streaming media to be skipped around in.
*
* @param string $location
* @param string $filename
* @param string $mimeType
* @return void