Skip to content

Instantly share code, notes, and snippets.

View kgreenek's full-sized avatar

Kevin Greene kgreenek

View GitHub Profile
@kgreenek
kgreenek / test.rs
Last active October 28, 2018 19:18
test-rs
let x = 5;
let y = 10;
fn test() -> i32 {
5
}
.DS_Store
*.swp
Builds
JuceLibraryCode
public class SecureData: NSMutableData {
public class func secureDataWithLength(length: Int) -> SecureData? {
if let data = CFDataCreateMutable(SecureMemoryAllocator.allocator, length) as? SecureData {
data.length = length
return data
}
return nil
}
}
public class SecureData: NSMutableData {
public init(length: Int) {
precondition(length > 0)
self = CFDataCreateMutable(SecureMemoryAllocator.allocator, length)
self.length = length
}
}
public enum PeerConnectionMessage {
case AddressMessage(BitcoinSwift.AddressMessage)
case InventoryMessage(BitcoinSwift.InventoryMessage)
case GetDataMessage(BitcoinSwift.GetDataMessage)
case NotFoundMessage(BitcoinSwift.NotFoundMessage)
case GetBlocksMessage(BitcoinSwift.GetBlocksMessage)
case GetHeadersMessage(BitcoinSwift.GetHeadersMessage)
case Transaction(BitcoinSwift.Transaction)
case Block(BitcoinSwift.Block)
case HeadersMessage(BitcoinSwift.HeadersMessage)
extension PeerConnection {
public enum Message {
case AddressMessage(AddressMessage)
case InventoryMessage(InventoryMessage)
case GetDataMessage(GetDataMessage)
case NotFoundMessage(NotFoundMessage)
case GetBlocksMessage(GetBlocksMessage)
case GetHeadersMessage(GetHeadersMessage)
case Transaction(Transaction)
//
// TransactionLockTime.swift
// BitcoinSwift
//
// Created by Kevin Greene on 9/27/14.
// Copyright (c) 2014 DoubleSha. All rights reserved.
//
import Foundation