I hereby claim:
- I am transitorykris on github.
- I am transitorykris (https://keybase.io/transitorykris) on keybase.
- I have a public key ASB7LcrMnsGn1N7I0OuSiyUA5g0fSHPas1_f2BJFXVw1nQo
To claim this, I am signing this object:
; synth.s - Playing with the SN76489AN chip | |
; SN76489AN - https://www.smspower.org/Development/SN76489 | |
; Data formats | |
; LCCTDDDD | |
; Latch indicator | |
; Channel | |
; Register type (0=tone, 1=volume) | |
; Data | |
; 1CCTDDDD (latch byte) |
enum CodingKeys: String, CodingKey { | |
case userName | |
case keyNetAddr | |
case storeNetAddr | |
case dirNetAddr | |
case publicKey | |
case privateKey | |
} | |
class Upspin: Codable { |
// With appropriate values for userName, keyNetAddr, storeNetAddr, dirNetAddr, proquint, and fileName | |
let client = SpinnerNewClient(userName, keyNetAddr, storeNetAddr, dirNetAddr, proquint) | |
// Save the client's configuration to the Keychain | |
let keychain = Keychain() | |
keychain.save(itemn: client) | |
// Create a new client from the configuration stored in they Keychain | |
let newClient = keychain.get() | |
print("Got client for \(newClient.config.userName())") |
enum keychainError: Error { | |
case failedToSave | |
case failedToGet | |
} | |
class Keychain: NSObject { | |
func save(item: Upspin) throws { | |
// Create a plist suitable for saving into the Keychain | |
let encoder = PropertyListEncoder() |
// With appropriate values for userName, keyNetAddr, storeNetAddr, dirNetAddr, proquint, and fileName | |
let client = SpinnerNewClient(userName, keyNetAddr, storeNetAddr, dirNetAddr, proquint) | |
var contents: Data | |
do { | |
try contents = upspin.client.get(fileName) | |
} catch { | |
fatalError("failed to get file: \(error)") | |
} |
// Factotum implements an agent, potentially remote, to handle private key operations. | |
type Factotum interface { | |
// DirEntryHash is a summary used in signing and verifying directory entries. | |
DirEntryHash(n, l PathName, a Attribute, p Packing, t Time, dkey, hash []byte) DEHash | |
// FileSign ECDSA-signs DirEntry fields and, in some packings, file contents. | |
FileSign(hash DEHash) (Signature, error) | |
// ScalarMult is the bare private key operator, used in unwrapping packed data. | |
// Each call needs security review to ensure it cannot be abused as a signing |
class Upspin: NSObject { | |
var config: SpinnerClientConfig! | |
var client: SpinnerClient! | |
init(userName: String, keyNetAddr: String, storeNetAddr: String, dirNetAddr: String, proquint: String) { | |
config = SpinnerNewClientConfig() | |
config.setUserName(userName) | |
config.setKeyNetAddr(keyNetAddr) | |
config.setStoreNetAddr(storeNetAddr) | |
config.setDirNetAddr(dirNetAddr) |
class Upspin: NSObject { | |
var config: SpinnerClientConfig! | |
var client: SpinnerClient! | |
init(userName: String, keyNetAddr: String, storeNetAddr: String, dirNetAddr: String, proquint: String) { | |
config = SpinnerNewClientConfig() | |
config.setUserName(userName) | |
config.setKeyNetAddr(keyNetAddr) | |
config.setStoreNetAddr(storeNetAddr) | |
config.setDirNetAddr(dirNetAddr) |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
""" | |
unshred.py - Instagram unshredder | |
http://instagram-engineering.tumblr.com/post/12651721845/instagram-engineering-challenge-the-unshredder | |
There are two main components to this. The first is computing a relevant | |
metric for each possible pair of slices. The second is ranking the | |
pairs/metrics. |