Skip to content

Instantly share code, notes, and snippets.

View XiaoYulong's full-sized avatar

Xiao Yulong XiaoYulong

View GitHub Profile
@Sajjon
Sajjon / RIPEMD160.swift
Created April 8, 2019 19:31
RIPEMD160 in Swift 5
/// RIPEMD160 implementation in Swift 5.
///
/// Based on the work of Sjors Provoost, found on [Github CryptoCoinSwift][1]
///
/// Migrated to Swift 5 by [Alex Cyon a.k.a. Sajjon][2]
///
/// [1]: https://github.com/CryptoCoinSwift/RIPEMD-Swift
/// [2]: https://github.com/Sajjon
///
@numist
numist / selector_belongsToProtocol.m
Last active April 26, 2022 07:16
Detect if a selector belongs to a protocol
/*
* Copyright © 2012 Scott Perry (http://numist.net)
*
* Released under the MIT License; its terms are at the end of this file.
*/
#import <objc/runtime.h>
/**
* `selector_belongsToProtocol` solves a common problem in proxy objects for delegates where selectors that are not part of the protocol may be unintentionally forwarded to the actual delegate.