├── .gitignore ├── BCFunctionTest ├── BCFunctionTest.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── BCFunctionTest.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── BCFunctionTest │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── BCFunctionTestTests │ ├── BCFunctionTestTests.m │ └── Info.plist ├── BCFunctionTestUITests │ ├── BCFunctionTestUITests.m │ └── Info.plist ├── BCGenerator.podspec ├── BCGenerator │ ├── BCGenerator.h │ ├── BCGenerator.m │ ├── BTC256.h │ ├── BTC256.m │ ├── BTCAddress.h │ ├── BTCAddress.m │ ├── BTCAddressSubclass.h │ ├── BTCBigNumber.h │ ├── BTCBigNumber.m │ ├── BTCCurvePoint.h │ ├── BTCCurvePoint.m │ ├── BTCErrors.h │ ├── BTCErrors.m │ ├── BTCKey.h │ ├── BTCKey.m │ ├── BTCNetwork.h │ ├── BTCNetwork.m │ ├── BTCOpcode.h │ ├── BTCOpcode.m │ ├── BTCProtocolSerialization.h │ ├── BTCProtocolSerialization.m │ ├── BTCScript.h │ ├── BTCScript.m │ ├── BTCSignatureHashType.h │ ├── EncryptUtil.h │ ├── EncryptUtil.m │ ├── NSString+SHA.h │ └── NSString+SHA.m ├── Podfile ├── Podfile.lock └── Pods │ ├── CBBase58 │ ├── CBBase58 │ │ └── base58 │ │ │ ├── BTCBase58.h │ │ │ ├── BTCBase58.m │ │ │ ├── BTCData.h │ │ │ ├── BTCData.m │ │ │ ├── NS+BTCBase58.h │ │ │ ├── NS+BTCBase58.m │ │ │ ├── NSData+Hashing.h │ │ │ └── NSData+Hashing.m │ ├── LICENSE │ └── README.md │ ├── CBSecp256k1 │ ├── CBSecp256k1 │ │ └── secp256k1 │ │ │ ├── CBSecp256k1.h │ │ │ ├── CBSecp256k1.m │ │ │ ├── NSData+HexString.h │ │ │ ├── NSData+HexString.m │ │ │ └── secp256k1.framework │ │ │ ├── Headers │ │ │ ├── Resources │ │ │ ├── Versions │ │ │ ├── A │ │ │ │ ├── Headers │ │ │ │ │ ├── secp256k1.h │ │ │ │ │ └── secp256k1_recovery.h │ │ │ │ ├── Resources │ │ │ │ │ └── Info.plist │ │ │ │ └── secp256k1 │ │ │ └── Current │ │ │ └── secp256k1 │ ├── LICENSE │ └── README.md │ ├── Headers │ ├── Private │ │ ├── CBBase58 │ │ │ ├── BTCBase58.h │ │ │ ├── BTCData.h │ │ │ ├── NS+BTCBase58.h │ │ │ └── NSData+Hashing.h │ │ ├── CBSecp256k1 │ │ │ ├── CBSecp256k1.h │ │ │ └── NSData+HexString.h │ │ └── OpenSSL-Universal │ │ │ └── openssl │ │ │ ├── aes.h │ │ │ ├── asn1.h │ │ │ ├── asn1_mac.h │ │ │ ├── asn1t.h │ │ │ ├── bio.h │ │ │ ├── blowfish.h │ │ │ ├── bn.h │ │ │ ├── buffer.h │ │ │ ├── camellia.h │ │ │ ├── cast.h │ │ │ ├── cmac.h │ │ │ ├── cms.h │ │ │ ├── comp.h │ │ │ ├── conf.h │ │ │ ├── conf_api.h │ │ │ ├── crypto.h │ │ │ ├── des.h │ │ │ ├── des_old.h │ │ │ ├── dh.h │ │ │ ├── dsa.h │ │ │ ├── dso.h │ │ │ ├── dtls1.h │ │ │ ├── e_os2.h │ │ │ ├── ebcdic.h │ │ │ ├── ec.h │ │ │ ├── ecdh.h │ │ │ ├── ecdsa.h │ │ │ ├── engine.h │ │ │ ├── err.h │ │ │ ├── evp.h │ │ │ ├── hmac.h │ │ │ ├── idea.h │ │ │ ├── krb5_asn.h │ │ │ ├── kssl.h │ │ │ ├── lhash.h │ │ │ ├── md4.h │ │ │ ├── md5.h │ │ │ ├── mdc2.h │ │ │ ├── modes.h │ │ │ ├── obj_mac.h │ │ │ ├── objects.h │ │ │ ├── ocsp.h │ │ │ ├── opensslconf.h │ │ │ ├── opensslv.h │ │ │ ├── ossl_typ.h │ │ │ ├── pem.h │ │ │ ├── pem2.h │ │ │ ├── pkcs12.h │ │ │ ├── pkcs7.h │ │ │ ├── pqueue.h │ │ │ ├── rand.h │ │ │ ├── rc2.h │ │ │ ├── rc4.h │ │ │ ├── ripemd.h │ │ │ ├── rsa.h │ │ │ ├── safestack.h │ │ │ ├── seed.h │ │ │ ├── sha.h │ │ │ ├── srp.h │ │ │ ├── srtp.h │ │ │ ├── ssl.h │ │ │ ├── ssl2.h │ │ │ ├── ssl23.h │ │ │ ├── ssl3.h │ │ │ ├── stack.h │ │ │ ├── symhacks.h │ │ │ ├── tls1.h │ │ │ ├── ts.h │ │ │ ├── txt_db.h │ │ │ ├── ui.h │ │ │ ├── ui_compat.h │ │ │ ├── whrlpool.h │ │ │ ├── x509.h │ │ │ ├── x509_vfy.h │ │ │ └── x509v3.h │ └── Public │ │ ├── CBBase58 │ │ ├── BTCBase58.h │ │ ├── BTCData.h │ │ ├── NS+BTCBase58.h │ │ └── NSData+Hashing.h │ │ ├── CBSecp256k1 │ │ ├── CBSecp256k1.h │ │ ├── NSData+HexString.h │ │ └── secp256k1 │ │ │ ├── secp256k1.h │ │ │ └── secp256k1_recovery.h │ │ └── OpenSSL-Universal │ │ └── openssl │ │ ├── aes.h │ │ ├── asn1.h │ │ ├── asn1_mac.h │ │ ├── asn1t.h │ │ ├── bio.h │ │ ├── blowfish.h │ │ ├── bn.h │ │ ├── buffer.h │ │ ├── camellia.h │ │ ├── cast.h │ │ ├── cmac.h │ │ ├── cms.h │ │ ├── comp.h │ │ ├── conf.h │ │ ├── conf_api.h │ │ ├── crypto.h │ │ ├── des.h │ │ ├── des_old.h │ │ ├── dh.h │ │ ├── dsa.h │ │ ├── dso.h │ │ ├── dtls1.h │ │ ├── e_os2.h │ │ ├── ebcdic.h │ │ ├── ec.h │ │ ├── ecdh.h │ │ ├── ecdsa.h │ │ ├── engine.h │ │ ├── err.h │ │ ├── evp.h │ │ ├── hmac.h │ │ ├── idea.h │ │ ├── krb5_asn.h │ │ ├── kssl.h │ │ ├── lhash.h │ │ ├── md4.h │ │ ├── md5.h │ │ ├── mdc2.h │ │ ├── modes.h │ │ ├── obj_mac.h │ │ ├── objects.h │ │ ├── ocsp.h │ │ ├── opensslconf.h │ │ ├── opensslv.h │ │ ├── ossl_typ.h │ │ ├── pem.h │ │ ├── pem2.h │ │ ├── pkcs12.h │ │ ├── pkcs7.h │ │ ├── pqueue.h │ │ ├── rand.h │ │ ├── rc2.h │ │ ├── rc4.h │ │ ├── ripemd.h │ │ ├── rsa.h │ │ ├── safestack.h │ │ ├── seed.h │ │ ├── sha.h │ │ ├── srp.h │ │ ├── srtp.h │ │ ├── ssl.h │ │ ├── ssl2.h │ │ ├── ssl23.h │ │ ├── ssl3.h │ │ ├── stack.h │ │ ├── symhacks.h │ │ ├── tls1.h │ │ ├── ts.h │ │ ├── txt_db.h │ │ ├── ui.h │ │ ├── ui_compat.h │ │ ├── whrlpool.h │ │ ├── x509.h │ │ ├── x509_vfy.h │ │ └── x509v3.h │ ├── Manifest.lock │ ├── OpenSSL-Universal │ ├── LICENSE.txt │ ├── README.md │ ├── include-ios │ │ └── openssl │ │ │ ├── aes.h │ │ │ ├── asn1.h │ │ │ ├── asn1_mac.h │ │ │ ├── asn1t.h │ │ │ ├── bio.h │ │ │ ├── blowfish.h │ │ │ ├── bn.h │ │ │ ├── buffer.h │ │ │ ├── camellia.h │ │ │ ├── cast.h │ │ │ ├── cmac.h │ │ │ ├── cms.h │ │ │ ├── comp.h │ │ │ ├── conf.h │ │ │ ├── conf_api.h │ │ │ ├── crypto.h │ │ │ ├── des.h │ │ │ ├── des_old.h │ │ │ ├── dh.h │ │ │ ├── dsa.h │ │ │ ├── dso.h │ │ │ ├── dtls1.h │ │ │ ├── e_os2.h │ │ │ ├── ebcdic.h │ │ │ ├── ec.h │ │ │ ├── ecdh.h │ │ │ ├── ecdsa.h │ │ │ ├── engine.h │ │ │ ├── err.h │ │ │ ├── evp.h │ │ │ ├── hmac.h │ │ │ ├── idea.h │ │ │ ├── krb5_asn.h │ │ │ ├── kssl.h │ │ │ ├── lhash.h │ │ │ ├── md4.h │ │ │ ├── md5.h │ │ │ ├── mdc2.h │ │ │ ├── modes.h │ │ │ ├── obj_mac.h │ │ │ ├── objects.h │ │ │ ├── ocsp.h │ │ │ ├── opensslconf.h │ │ │ ├── opensslv.h │ │ │ ├── ossl_typ.h │ │ │ ├── pem.h │ │ │ ├── pem2.h │ │ │ ├── pkcs12.h │ │ │ ├── pkcs7.h │ │ │ ├── pqueue.h │ │ │ ├── rand.h │ │ │ ├── rc2.h │ │ │ ├── rc4.h │ │ │ ├── ripemd.h │ │ │ ├── rsa.h │ │ │ ├── safestack.h │ │ │ ├── seed.h │ │ │ ├── sha.h │ │ │ ├── srp.h │ │ │ ├── srtp.h │ │ │ ├── ssl.h │ │ │ ├── ssl2.h │ │ │ ├── ssl23.h │ │ │ ├── ssl3.h │ │ │ ├── stack.h │ │ │ ├── symhacks.h │ │ │ ├── tls1.h │ │ │ ├── ts.h │ │ │ ├── txt_db.h │ │ │ ├── ui.h │ │ │ ├── ui_compat.h │ │ │ ├── whrlpool.h │ │ │ ├── x509.h │ │ │ ├── x509_vfy.h │ │ │ └── x509v3.h │ └── lib-ios │ │ ├── libcrypto.a │ │ └── libssl.a │ ├── Pods.xcodeproj │ └── project.pbxproj │ └── Target Support Files │ ├── CBBase58 │ ├── CBBase58-dummy.m │ ├── CBBase58-prefix.pch │ └── CBBase58.xcconfig │ ├── CBSecp256k1 │ ├── CBSecp256k1-dummy.m │ ├── CBSecp256k1-prefix.pch │ └── CBSecp256k1.xcconfig │ └── Pods-BCFunctionTest │ ├── Pods-BCFunctionTest-acknowledgements.markdown │ ├── Pods-BCFunctionTest-acknowledgements.plist │ ├── Pods-BCFunctionTest-dummy.m │ ├── Pods-BCFunctionTest-frameworks.sh │ ├── Pods-BCFunctionTest-resources.sh │ ├── Pods-BCFunctionTest.debug.xcconfig │ └── Pods-BCFunctionTest.release.xcconfig ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 52 | 53 | fastlane/report.xml 54 | fastlane/Preview.html 55 | fastlane/screenshots 56 | fastlane/test_output 57 | 58 | # Code Injection 59 | # 60 | # After new code Injection tools there's a generated folder /iOSInjectionProject 61 | # https://github.com/johnno1962/injectionforxcode 62 | 63 | iOSInjectionProject/ 64 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BCFunctionTest 4 | // 5 | // Created by caobo56 on 2018/4/25. 6 | // Copyright © 2018年 caobo56. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // BCFunctionTest 4 | // 5 | // Created by caobo56 on 2018/4/25. 6 | // Copyright © 2018年 caobo56. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // BCFunctionTest 4 | // 5 | // Created by caobo56 on 2018/4/25. 6 | // Copyright © 2018年 caobo56. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // BCFunctionTest 4 | // 5 | // Created by caobo56 on 2018/4/25. 6 | // Copyright © 2018年 caobo56. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "BCGenerator.h" 11 | #import "BTCScript.h" 12 | #import "BTCAddress.h" 13 | 14 | 15 | @interface ViewController () 16 | 17 | @end 18 | 19 | @implementation ViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | // Do any additional setup after loading the view, typically from a nib. 24 | [self test]; 25 | } 26 | 27 | 28 | - (void)didReceiveMemoryWarning { 29 | [super didReceiveMemoryWarning]; 30 | // Dispose of any resources that can be recreated. 31 | } 32 | 33 | -(void)test{ 34 | BCGenerator * generator = [[BCGenerator alloc]initWithWith:@"pseudorandom sequence"]; 35 | // pseudorandom sequence 为你的随机数生成的结果 36 | 37 | NSLog(@"generator.rootPrivatekey = %@",generator.rootPrivatekey); 38 | NSLog(@"generator.mainProcessingKey = %@",generator.mainProcessingKey); 39 | NSLog(@"generator.rootPublickey = %@",generator.rootPublickey); 40 | NSLog(@"generator.address = %@",generator.address); 41 | 42 | BTCScript* outputScript = [[BTCScript alloc] initWithAddress:[BTCAddress addressWithString:generator.address]]; 43 | NSLog(@"outputScript.data == %@",outputScript.data); 44 | } 45 | 46 | 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BCFunctionTest 4 | // 5 | // Created by caobo56 on 2018/4/25. 6 | // Copyright © 2018年 caobo56. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTestTests/BCFunctionTestTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BCFunctionTestTests.m 3 | // BCFunctionTestTests 4 | // 5 | // Created by caobo56 on 2018/4/25. 6 | // Copyright © 2018年 caobo56. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BCFunctionTestTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation BCFunctionTestTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTestTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTestUITests/BCFunctionTestUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BCFunctionTestUITests.m 3 | // BCFunctionTestUITests 4 | // 5 | // Created by caobo56 on 2018/4/25. 6 | // Copyright © 2018年 caobo56. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BCFunctionTestUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation BCFunctionTestUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /BCFunctionTest/BCFunctionTestUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BCGenerator.h: -------------------------------------------------------------------------------- 1 | // 2 | // BCGenerator.h 3 | // BCFunctionTest 4 | // 5 | // Created by caobo56 on 2018/4/26. 6 | // Copyright © 2018年 caobo56. All rights reserved. 7 | // 8 | 9 | /** 10 | 使用方法: 11 | #import "BCGenerator.h" 12 | 13 | -(void)test{ 14 | BCGenerator * generator = [[BCGenerator alloc]initWithWith:@"pseudorandom sequence"]; 15 | NSLog(@"\ngenerator.rootPrivatekey = %@\n generator.mainProcessingKey = %@\ngenerator.rootPublickey = %@\ngenerator.address = %@",generator.rootPrivatekey,generator.mainProcessingKey,generator.rootPublickey,generator.address); 16 | } 17 | */ 18 | 19 | #import 20 | 21 | @interface BCGenerator : NSObject 22 | 23 | @property(strong,nonatomic)NSData * rootPrivatekey; 24 | //主私钥 25 | 26 | @property(strong,nonatomic)NSData * mainProcessingKey; 27 | //主链编码 28 | 29 | @property(strong,nonatomic)NSData * rootPublickey; 30 | //主公钥 31 | 32 | @property(strong,nonatomic)NSString * address; 33 | //由主公钥生成的比特币地址 34 | 35 | /** 36 | 根据伪随机数生成种子 37 | 38 | @param seedStr seedStr 根据伪随机数 39 | @return return instancetype 生成的对象 40 | */ 41 | -(instancetype)initWithWith:(NSString *)seedStr; 42 | 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BCGenerator.m: -------------------------------------------------------------------------------- 1 | // 2 | // BCGenerator.m 3 | // BCFunctionTest 4 | // 5 | // Created by caobo56 on 2018/4/26. 6 | // Copyright © 2018年 caobo56. All rights reserved. 7 | // 8 | 9 | #import "BCGenerator.h" 10 | #import "EncryptUtil.h" 11 | #import 12 | #import 13 | #import 14 | #import 15 | 16 | static const NSString * BTCHMACSHA512key = @"Bitcoin seed"; 17 | //BTCHMACSHA512算法的key 这里用的是比特币的key 18 | 19 | @interface BCGenerator() 20 | 21 | @property(strong,nonatomic)NSData * seedData; 22 | 23 | @end 24 | 25 | @implementation BCGenerator 26 | 27 | 28 | -(instancetype)initWithWith:(NSString *)seedStr{ 29 | self = [super init]; 30 | if (self) { 31 | [self creatSeedWith:seedStr]; 32 | [self creatRootPrivatekey]; 33 | [self creatmainProcessingKey]; 34 | [self creatRootPublickey]; 35 | [self creatAddress]; 36 | } 37 | return self; 38 | } 39 | 40 | 41 | -(void)creatSeedWith:(NSString *)seedStr{ 42 | NSData *seedData = [seedStr dataUsingEncoding:NSUTF8StringEncoding]; 43 | _seedData = [[EncryptUtil sha256DataTwice:seedData] copy]; 44 | } 45 | 46 | -(void)creatRootPrivatekey{ 47 | NSData * hmac = BTCHMACSHA512([BTCHMACSHA512key dataUsingEncoding:NSUTF8StringEncoding], _seedData); 48 | self.rootPrivatekey = [[hmac subdataWithRange:NSMakeRange(0, hmac.length/2)] copy]; 49 | } 50 | 51 | -(void)creatmainProcessingKey{ 52 | NSData * hmac = BTCHMACSHA512([BTCHMACSHA512key dataUsingEncoding:NSUTF8StringEncoding], _seedData); 53 | self.mainProcessingKey = [[hmac subdataWithRange:NSMakeRange(hmac.length/2, self.rootPrivatekey.length)] copy]; 54 | } 55 | 56 | -(void)creatRootPublickey{ 57 | _rootPublickey = [[CBSecp256k1 generatePublicKeyWithPrivateKey:_rootPrivatekey compression:YES] copy]; 58 | } 59 | 60 | -(void)creatAddress{ 61 | NSData * address = BTCHash160(_rootPublickey); 62 | NSData * dat = [EncryptUtil convertHexStrToData:@"0"]; 63 | NSMutableData * add = [[NSMutableData alloc]initWithData:dat]; 64 | [add appendData:address]; 65 | _address = [[add base58CheckString] copy]; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTC256.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #import 4 | 5 | // A set of ubiquitous types and functions to deal with fixed-length chunks of data 6 | // (160-bit, 256-bit and 512-bit). These are relevant almost always to hashes, 7 | // but there's no hash-specific about them. 8 | // The purpose of these is to avoid dynamic memory allocations via NSData when 9 | // we need to move exactly 32 bytes around. 10 | // 11 | // We don't call these BTCFixedData256 because these types are way too ubiquituous 12 | // in CoreBitcoin to have such an explicit name. 13 | // 14 | // Somewhat similar to uint256 in bitcoind, but here we don't try 15 | // to pretend that these are integers and then allow arithmetic on them 16 | // and create a mess with the byte order. 17 | // Use BTCBigNumber to do arithmetic on big numbers and convert 18 | // to bignum format explicitly. 19 | // BTCBigNumber has API for converting BTC256 to a big int. 20 | // 21 | // We also declare BTC160 and BTC512 for use with RIPEMD-160, SHA-1 and SHA-512 hashes. 22 | 23 | 24 | // 1. Fixed-length types 25 | 26 | struct private_BTC160 27 | { 28 | // 160 bits can't be formed with 64-bit words, so we have to use 32-bit ones instead. 29 | uint32_t words32[5]; 30 | } __attribute__((packed)); 31 | typedef struct private_BTC160 BTC160; 32 | 33 | struct private_BTC256 34 | { 35 | // Since all modern CPUs are 64-bit (ARM is 64-bit starting with iPhone 5s), 36 | // we will use 64-bit words. 37 | uint64_t words64[4]; 38 | } __attribute__((aligned(1))); 39 | typedef struct private_BTC256 BTC256; 40 | 41 | struct private_BTC512 42 | { 43 | // Since all modern CPUs are 64-bit (ARM is 64-bit starting with iPhone 5s), 44 | // we will use 64-bit words. 45 | uint64_t words64[8]; 46 | } __attribute__((aligned(1))); 47 | typedef struct private_BTC512 BTC512; 48 | 49 | 50 | // 2. Constants 51 | 52 | // All-zero constants 53 | extern const BTC160 BTC160Zero; 54 | extern const BTC256 BTC256Zero; 55 | extern const BTC512 BTC512Zero; 56 | 57 | // All-one constants 58 | extern const BTC160 BTC160Max; 59 | extern const BTC256 BTC256Max; 60 | extern const BTC512 BTC512Max; 61 | 62 | // First 160 bits of SHA512("CoreBitcoin/BTC160Null") 63 | extern const BTC160 BTC160Null; 64 | 65 | // First 256 bits of SHA512("CoreBitcoin/BTC256Null") 66 | extern const BTC256 BTC256Null; 67 | 68 | // Value of SHA512("CoreBitcoin/BTC512Null") 69 | extern const BTC512 BTC512Null; 70 | 71 | 72 | // 3. Comparison 73 | 74 | BOOL BTC160Equal(BTC160 chunk1, BTC160 chunk2); 75 | BOOL BTC256Equal(BTC256 chunk1, BTC256 chunk2); 76 | BOOL BTC512Equal(BTC512 chunk1, BTC512 chunk2); 77 | 78 | NSComparisonResult BTC160Compare(BTC160 chunk1, BTC160 chunk2); 79 | NSComparisonResult BTC256Compare(BTC256 chunk1, BTC256 chunk2); 80 | NSComparisonResult BTC512Compare(BTC512 chunk1, BTC512 chunk2); 81 | 82 | 83 | // 4. Operations 84 | 85 | 86 | // Inverse (b = ~a) 87 | BTC160 BTC160Inverse(BTC160 chunk); 88 | BTC256 BTC256Inverse(BTC256 chunk); 89 | BTC512 BTC512Inverse(BTC512 chunk); 90 | 91 | // Swap byte order 92 | BTC160 BTC160Swap(BTC160 chunk); 93 | BTC256 BTC256Swap(BTC256 chunk); 94 | BTC512 BTC512Swap(BTC512 chunk); 95 | 96 | // Bitwise AND operation (a & b) 97 | BTC160 BTC160AND(BTC160 chunk1, BTC160 chunk2); 98 | BTC256 BTC256AND(BTC256 chunk1, BTC256 chunk2); 99 | BTC512 BTC512AND(BTC512 chunk1, BTC512 chunk2); 100 | 101 | // Bitwise OR operation (a | b) 102 | BTC160 BTC160OR(BTC160 chunk1, BTC160 chunk2); 103 | BTC256 BTC256OR(BTC256 chunk1, BTC256 chunk2); 104 | BTC512 BTC512OR(BTC512 chunk1, BTC512 chunk2); 105 | 106 | // Bitwise exclusive-OR operation (a ^ b) 107 | BTC160 BTC160XOR(BTC160 chunk1, BTC160 chunk2); 108 | BTC256 BTC256XOR(BTC256 chunk1, BTC256 chunk2); 109 | BTC512 BTC512XOR(BTC512 chunk1, BTC512 chunk2); 110 | 111 | // Concatenation of two 256-bit chunks 112 | BTC512 BTC512Concat(BTC256 chunk1, BTC256 chunk2); 113 | 114 | 115 | // 5. Conversion functions 116 | 117 | 118 | // Conversion to NSData 119 | NSData* NSDataFromBTC160(BTC160 chunk); 120 | NSData* NSDataFromBTC256(BTC256 chunk); 121 | NSData* NSDataFromBTC512(BTC512 chunk); 122 | 123 | // Conversion from NSData. 124 | // If NSData is not big enough, returns BTCHash{160,256,512}Null. 125 | BTC160 BTC160FromNSData(NSData* data); 126 | BTC256 BTC256FromNSData(NSData* data); 127 | BTC512 BTC512FromNSData(NSData* data); 128 | 129 | // Returns lowercase hex representation of the chunk 130 | NSString* NSStringFromBTC160(BTC160 chunk); 131 | NSString* NSStringFromBTC256(BTC256 chunk); 132 | NSString* NSStringFromBTC512(BTC512 chunk); 133 | 134 | // Conversion from hex NSString (lower- or uppercase). 135 | // If string is invalid or data is too short, returns BTCHash{160,256,512}Null. 136 | BTC160 BTC160FromNSString(NSString* string); 137 | BTC256 BTC256FromNSString(NSString* string); 138 | BTC512 BTC512FromNSString(NSString* string); 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTCAddress.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #import 4 | 5 | // Addresses are Base58-encoded pieces of data representing various objects: 6 | // 7 | // 1. Public key (actually, a hash of a public key) address. Example: 19FGfswVqxNubJbh1NW8A4t51T9x9RDVWQ. 8 | // 2. Private key for uncompressed public key. Example: 5KQntKuhYWSRXNqp2yhdXzjekYAR7US3MT1715Mbv5CyUKV6hVe. 9 | // 3. Private key for compressed public key. Example: L3p8oAcQTtuokSCRHQ7i4MhjWc9zornvpJLfmg62sYpLRJF9woSu. 10 | // 4. Script address (P2SH). Example: 3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8. 11 | // 12 | // Testnet addresses are also supported with the following subclasses: 13 | // BTCPublicKeyAddressTestnet, 14 | // BTCPrivateKeyAddressTestnet, 15 | // BTCScriptHashAddressTestnet. 16 | // 17 | @class BTCKey; 18 | @class BTCNetwork; 19 | @interface BTCAddress : NSObject 20 | 21 | /*! 22 | * Allows subclasses to be instantiated by a call to a superclass: BTCAddress(string: "...") 23 | */ 24 | + (void) registerAddressClass:(nonnull Class)addressClass version:(uint8_t)version; 25 | 26 | /*! 27 | * Returns an instance of a specific subclass depending on version number. 28 | * Returns nil for unsupported addresses. 29 | */ 30 | + (nullable instancetype) addressWithString:(nullable NSString*)string; 31 | 32 | /*! 33 | * Initializes address with raw data. Should only be used in subclasses, base class will raise exception. 34 | * Returns an instance of a specific subclass depending on version number. 35 | */ 36 | + (nullable instancetype) addressWithData:(nullable NSData*)data; 37 | 38 | /*! 39 | * Returns binary contents of an address (without checksums or version number). 40 | * 20 bytes for hashes, 32 bytes for private key. 41 | */ 42 | @property(nonatomic, readonly, nonnull) NSData* data; 43 | 44 | /*! 45 | * Returns representation in base58 encoding. 46 | */ 47 | @property(nonatomic, readonly, nonnull) NSString* string; 48 | 49 | /*! 50 | * Returns a public version of this address. By default it is a receiver itself. 51 | * PrivateKeyAddress returns appropriate PublicKeyAddress. 52 | */ 53 | @property(nonatomic, readonly, nonnull) BTCAddress* publicAddress; 54 | 55 | /*! 56 | * Returns mainnet or testnet3 instance. 57 | */ 58 | @property(nonatomic, readonly, nonnull) BTCNetwork* network; 59 | 60 | /*! 61 | * Returns YES if this address is intended for testnet. 62 | */ 63 | @property(nonatomic, readonly) BOOL isTestnet; 64 | 65 | /*! 66 | * Clears contents of the data to prevent leaks. 67 | */ 68 | - (void) clear; 69 | 70 | 71 | // Returns an instance of a specific subclass depending on version number. 72 | // Returns nil for unsupported addresses. 73 | // DEPRECATED! Use `-addressWithString:` instead. 74 | + (nullable instancetype) addressWithBase58String:(nullable NSString*)string DEPRECATED_ATTRIBUTE; 75 | // Returns representation in base58 encoding. 76 | // DEPRECATED! Use -string instead. 77 | @property(nonatomic, readonly, nonnull) NSString* base58String DEPRECATED_ATTRIBUTE; 78 | 79 | @end 80 | 81 | 82 | // Standard public key address (19FGfswVqxNubJbh1NW8A4t51T9x9RDVWQ) 83 | @interface BTCPublicKeyAddress : BTCAddress 84 | @end 85 | @interface BTCPublicKeyAddressTestnet : BTCPublicKeyAddress 86 | @end 87 | 88 | 89 | // Private key in WIF format (5KQntKuhYWSRXNq... or L3p8oAcQTtuokSC..., base58-encoded) 90 | @interface BTCPrivateKeyAddress : BTCAddress 91 | // Private key itself is not compressed, but it has extra 0x01 byte to indicate 92 | // that derived pubkey must be compressed (as this affects the address derived from pubkey). 93 | @property(nonatomic, getter=isPublicKeyCompressed) BOOL publicKeyCompressed; 94 | 95 | // Returns BTCKey containing a key pair. Its public key is compressed as specified by the address. 96 | @property(nonatomic, readonly, nonnull) BTCKey* key; 97 | 98 | // Creates address from raw private key data. If the public key must be compressed, pass YES to publicKeyCompressed:. 99 | + (nullable instancetype) addressWithData:(nullable NSData*)data publicKeyCompressed:(BOOL)compressedPubkey; 100 | @end 101 | @interface BTCPrivateKeyAddressTestnet : BTCPrivateKeyAddress 102 | @end 103 | 104 | // P2SH address (e.g. 3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8) 105 | @interface BTCScriptHashAddress : BTCAddress 106 | @end 107 | @interface BTCScriptHashAddressTestnet : BTCScriptHashAddress 108 | @end 109 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTCAddressSubclass.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #ifndef CoreBitcoin_BTCAddressSubclass_h 4 | #define CoreBitcoin_BTCAddressSubclass_h 5 | 6 | @interface BTCAddress () 7 | @property(nonatomic, readwrite) NSData* data; 8 | @end 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTCCurvePoint.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #import 4 | #include 5 | 6 | // Represents a point on the elliptic curve secp256k1. 7 | // Combined with BTCBigNumber arithmetic, you can do usual EC operations to manipulate private and public keys. 8 | // Private key is a big integer (represented by raw NSData or BTCBigNumber). 9 | // Public key is a point on the curve represented by BTCCurvePoint or BTCKey. 10 | // BTCCurvePoint is mutable. There is no immutable counterpart. 11 | @class BTCKey; 12 | @class BTCBigNumber; 13 | @interface BTCCurvePoint : NSObject 14 | 15 | // Serialized form of a curve point as a compressed public key (32-byte X coordinate with 1-byte prefix) 16 | @property(nonatomic, readonly) NSData* data; 17 | 18 | // Underlying data structure in OpenSSL. 19 | @property(nonatomic, readonly) const EC_POINT* EC_POINT; 20 | 21 | // Returns YES if the point is at infinity. 22 | @property(nonatomic, readonly) BOOL isInfinity; 23 | 24 | // Coordinates of the point 25 | @property(nonatomic, readonly) BTCBigNumber* x; 26 | @property(nonatomic, readonly) BTCBigNumber* y; 27 | 28 | // Returns the generator point. Same as [BTCCurvePoint alloc] init]. 29 | + (instancetype) generator; 30 | 31 | // Returns order of the secp256k1 curve (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141). 32 | + (BTCBigNumber*) curveOrder; 33 | 34 | // Initializes point with its binary representation (corresponds to -data). 35 | - (id) initWithData:(NSData*)data; 36 | 37 | // Initializes point with OpenSSL EC_POINT. 38 | - (id) initWithEC_POINT:(const EC_POINT*)ecpoint; 39 | 40 | // These modify the receiver and return self (or nil in case of error). To create another point use -copy: [[point copy] multiply:number] 41 | - (instancetype) multiply:(BTCBigNumber*)number; 42 | - (instancetype) add:(BTCCurvePoint*)point; 43 | 44 | // Efficiently adds n*G to the receiver. Equivalent to [point add:[[G copy] multiply:number]] 45 | - (instancetype) addGeneratorMultipliedBy:(BTCBigNumber*)number; 46 | 47 | // Re-declared `-copy` to provide exact return type. 48 | - (BTCCurvePoint*) copy; 49 | 50 | // Clears internal point data. 51 | - (void) clear; 52 | 53 | 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTCErrors.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #import 4 | 5 | extern NSString* const BTCErrorDomain; 6 | 7 | typedef NS_ENUM(NSUInteger, BTCErrorCode) { 8 | 9 | // Canonical pubkey/signature check errors 10 | BTCErrorNonCanonicalPublicKey = 4001, 11 | BTCErrorNonCanonicalScriptSignature = 4002, 12 | 13 | // Script verification errors 14 | BTCErrorScriptError = 5001, 15 | 16 | // BTCPriceSource errors 17 | BTCErrorUnsupportedCurrencyCode = 6001, 18 | 19 | // BIP70 Payment Protocol errors 20 | BTCErrorPaymentRequestInvalidResponse = 7001, 21 | BTCErrorPaymentRequestTooBig = 7002, 22 | 23 | // Secret Sharing errors 24 | BTCErrorIncompatibleSecret = 10001, 25 | BTCErrorInsufficientShares = 10002, 26 | BTCErrorMalformedShare = 10003, 27 | }; -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTCErrors.m: -------------------------------------------------------------------------------- 1 | #import "BTCErrors.h" 2 | 3 | NSString* const BTCErrorDomain = @"com.oleganza.CoreBitcoin"; 4 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTCNetwork.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #import 4 | #import "BTC256.h" 5 | 6 | @class BTCBigNumber; 7 | @class BTCBlock; 8 | @interface BTCNetwork : NSObject 9 | 10 | - (id) initWithName:(NSString*)name; 11 | 12 | // Available networks 13 | 14 | // Main Bitcoin network, singleton instance. 15 | + (BTCNetwork*) mainnet; 16 | 17 | // Testnet3 (current testnet), singleton instance. 18 | + (BTCNetwork*) testnet; 19 | 20 | 21 | 22 | // Network Parameters 23 | // Note: all properties are writable so you can tweak parameters for testing purposes. 24 | // If you do so, you may want to use -copy. 25 | 26 | 27 | // Returns YES if this network is testnet3 (used to tweak certain validation rules). 28 | @property(nonatomic, readonly) BOOL isTestnet; 29 | 30 | // Returns opposite of `isTestnet`. 31 | @property(nonatomic, readonly) BOOL isMainnet; 32 | 33 | // Name of the network ("mainnet", "testnet3" etc) 34 | @property(nonatomic, copy) NSString* name; 35 | 36 | // Name of the network for BIP70 Payment Details ("main", "test" or some custom name used in `-initWithName:`) 37 | @property(nonatomic, copy) NSString* paymentProtocolName; 38 | 39 | // Hash of the genesis block. 40 | @property(nonatomic) NSData* genesisBlockHash; 41 | 42 | // Default port for TCP connections. 43 | @property(nonatomic) uint32_t defaultPort; 44 | 45 | // Maximum target for the proof of work: CBigNum(~uint256(0) >> 32) for mainnet. 46 | @property(nonatomic) BTCBigNumber* proofOfWorkLimit; 47 | 48 | // Array of pairs @[ @(int ), NSData* ] sorted by height. 49 | @property(nonatomic) NSArray* checkpoints; 50 | 51 | 52 | // Returns a checkpoint hash if it exists or BTC256Zero if there is no checkpoint at such height. 53 | - (NSData*) checkpointAtHeight:(int)height; 54 | 55 | // Returns height of checkpoint or -1 if there is no such checkpoint. 56 | - (int) heightForCheckpoint:(NSData*)checkpointHash; 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTCNetwork.m: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #import "BTCNetwork.h" 4 | #import "BTCBigNumber.h" 5 | #import "BTCKey.h" 6 | 7 | @implementation BTCNetwork { 8 | BOOL _isMainnet; 9 | BOOL _isTestnet; 10 | } 11 | 12 | - (id) initWithName:(NSString*)name { 13 | if (self = [self initWithName:name paymentProtocolName:nil]) { 14 | } 15 | return self; 16 | } 17 | 18 | - (id) initWithName:(NSString*)name paymentProtocolName:(NSString*)ppName { 19 | if (self = [super init]) { 20 | _name = name; 21 | _paymentProtocolName = ppName; 22 | } 23 | return self; 24 | } 25 | 26 | + (BTCNetwork*) mainnet { 27 | static BTCNetwork* network; 28 | static dispatch_once_t onceToken; 29 | dispatch_once(&onceToken, ^{ 30 | 31 | network = [[BTCNetwork alloc] initWithName:@"mainnet" paymentProtocolName:@"main"]; 32 | network->_isMainnet = YES; 33 | 34 | // TODO: set all parameters here. 35 | 36 | }); 37 | return network; 38 | } 39 | 40 | + (BTCNetwork*) testnet { 41 | static BTCNetwork* network; 42 | static dispatch_once_t onceToken; 43 | dispatch_once(&onceToken, ^{ 44 | 45 | network = [[BTCNetwork alloc] initWithName:@"testnet3" paymentProtocolName:@"test"]; 46 | network->_isTestnet = YES; 47 | 48 | // TODO: set all parameters here. 49 | 50 | }); 51 | return network; 52 | } 53 | 54 | - (BOOL) isMainnet { 55 | return _isMainnet; 56 | } 57 | 58 | - (BOOL) isTestnet { 59 | return _isTestnet; 60 | } 61 | 62 | - (NSString*) paymentProtocolName { 63 | return _paymentProtocolName ?: _name; 64 | } 65 | 66 | 67 | #pragma mark - Checkpoints 68 | 69 | 70 | // Returns a checkpoint hash if it exists or nil if there is no checkpoint at such height. 71 | - (NSData*) checkpointAtHeight:(int)height { 72 | for (NSArray* pair in self.checkpoints) { 73 | int h = [pair[0] intValue]; 74 | if (h == height) { 75 | return pair[1]; 76 | } 77 | } 78 | return nil; 79 | } 80 | 81 | // Returns height of checkpoint or -1 if there is no such checkpoint. 82 | - (int) heightForCheckpoint:(NSData*)checkpointHash { 83 | if (!checkpointHash) return -1; 84 | 85 | for (NSArray* pair in self.checkpoints) { 86 | if ([pair[1] isEqual:checkpointHash]) { 87 | return [pair[0] intValue]; 88 | } 89 | } 90 | return -1; 91 | } 92 | 93 | 94 | 95 | #pragma mark - NSCopying 96 | 97 | 98 | - (id) copyWithZone:(NSZone *)zone { 99 | BTCNetwork* network = [[BTCNetwork alloc] copy]; 100 | 101 | network->_isTestnet = _isTestnet; 102 | network.name = self.name; 103 | network.genesisBlockHash = self.genesisBlockHash; 104 | network.defaultPort = self.defaultPort; 105 | network.proofOfWorkLimit = [self.proofOfWorkLimit copy]; 106 | network.checkpoints = [self.checkpoints copy]; 107 | 108 | return network; 109 | } 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTCProtocolSerialization.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #import 4 | 5 | // A collection of routines dealing with parsing and writing various protocol messages. 6 | @interface BTCProtocolSerialization : NSObject 7 | 8 | // This implementation of variable-length integer is known as "CompactSize" in Satoshi code (BitcoinQT). 9 | // 10 | // Value Storage length Format 11 | // < 0xfd 1 uint8_t 12 | // <= 0xffff 3 0xfd followed by the value as uint16_t 13 | // <= 0xffffffff 5 0xfe followed by the value as uint32_t 14 | // > 0xffffffff 9 0xff followed by the value as uint64_t 15 | // 16 | // Note: BitcoinQT later added VarInt which is different, more compact format 17 | // used in block storage. VarInt is not a part of the protocol and is not implemented here. 18 | 19 | // Attempts to read integer from data and returns amount of bytes read. 20 | // In case of error, returns 0. 21 | + (NSUInteger) readVarInt:(uint64_t*)valueOut fromData:(NSData*)data; 22 | + (NSUInteger) readVarInt:(uint64_t*)valueOut fromStream:(NSInputStream*)stream; 23 | 24 | // Attempts to read string prepended by its length in varInt format. 25 | // On success, returns data. On failure, returns nil. 26 | // lengthOut is an optional out parameter that contains total bytes read (including the length prefix) 27 | + (NSData*) readVarStringFromData:(NSData*)data; 28 | + (NSData*) readVarStringFromData:(NSData*)data readBytes:(NSUInteger*)lengthOut; 29 | + (NSData*) readVarStringFromStream:(NSInputStream*)stream; 30 | 31 | // Encodes value in a varint binary form. 32 | + (NSData*) dataForVarInt:(uint64_t)value; 33 | 34 | // Prepends binary string with its length in varInt format. 35 | + (NSData*) dataForVarString:(NSData*)binaryString; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/BTCSignatureHashType.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #ifndef CoreBitcoin_BTCSignatureHashType_h 4 | #define CoreBitcoin_BTCSignatureHashType_h 5 | 6 | // Hash type determines how OP_CHECKSIG hashes the transaction to create or 7 | // verify the signature in a transaction input. 8 | // Depending on hash type, transaction is modified in some way before its hash is computed. 9 | // Hash type is 1 byte appended to a signature in a transaction input. 10 | typedef NS_ENUM(unsigned char, BTCSignatureHashType) 11 | { 12 | // First three types are mutually exclusive (tested using "type & 0x1F"). 13 | 14 | // Default. Signs all inputs and outputs. 15 | // Other inputs have scripts and sequences zeroed out, current input has its script 16 | // replaced by the previous transaction's output script (or, in case of P2SH, 17 | // by the signatures and the redemption script). 18 | // If (type & 0x1F) is not NONE or SINGLE, then this type is used. 19 | SIGHASH_ALL = 1, 20 | BTCSignatureHashTypeAll = SIGHASH_ALL, 21 | 22 | // All outputs are removed. "I don't care where it goes as long as others pay". 23 | // Note: this is not safe when used with ANYONECANPAY, because then anyone who relays the transaction 24 | // can pick your input and use in his own transaction. 25 | // It's also not safe if all inputs are SIGHASH_NONE as well (or it's the only input). 26 | SIGHASH_NONE = 2, 27 | BTCSignatureHashTypeNone = SIGHASH_NONE, 28 | 29 | // Hash only the output with the same index as the current input. 30 | // Preceding outputs are "nullified", other outputs are removed. 31 | // Special case: if there is no matching output, hash is "0000000000000000000000000000000000000000000000000000000000000001" (32 bytes) 32 | SIGHASH_SINGLE = 3, 33 | BTCSignatureHashTypeSingle = SIGHASH_SINGLE, 34 | 35 | // This mask is used to determine one of the first types independently from ANYONECANPAY option: 36 | // E.g. if (type & SIGHASH_OUTPUT_MASK == SIGHASH_NONE) { blank all outputs } 37 | SIGHASH_OUTPUT_MASK = 0x1F, 38 | BTCSignatureHashTypeOutputMask = SIGHASH_OUTPUT_MASK, 39 | 40 | // Removes all inputs except for current txin before hashing. 41 | // This allows to sign the transaction outputs without knowing who and how adds other inputs. 42 | // E.g. a crowdfunding transaction with 100 BTC output can be signed independently by any number of people 43 | // and will become valid only when someone combines all inputs in a single transaction to make it valid. 44 | // Can be used together with any of the above types. 45 | SIGHASH_ANYONECANPAY = 0x80, 46 | BTCSignatureHashTypeAnyoneCanPay = SIGHASH_ANYONECANPAY, 47 | }; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/EncryptUtil.h: -------------------------------------------------------------------------------- 1 | // 2 | // EncryptUtil.h 3 | // textDemo 4 | // 5 | // Created by caobo56 on 2018/3/13. 6 | // Copyright © 2018年 dahua. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface EncryptUtil : NSObject 12 | 13 | + (NSString*)sha1StrWithString:(NSString *)str; 14 | 15 | + (NSString*)sha1StrWithData:(NSData *)data; 16 | 17 | + (NSData*)sha1DataWithData:(NSData *)data; 18 | 19 | + (Byte *)sha1BytesWithData:(NSData *)data; 20 | 21 | + (NSString *)sha256StringWithString:(NSString *)srcString; 22 | 23 | + (NSString *)sha256StringWithData:(NSData *)data; 24 | 25 | + (NSData *)sha256DataWithData:(NSData *)data; 26 | 27 | + (NSData *)sha256DataTwice:(NSData *)data; 28 | 29 | + (NSData *)sha256DataTwiceKey:(NSData *)data; 30 | 31 | + (NSData *)convertHexStrToData:(NSString *)str; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/NSString+SHA.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+SHA.h 3 | // textDemo 4 | // 5 | // Created by caobo56 on 2018/4/25. 6 | // Copyright © 2018年 dahua. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | #import 14 | 15 | @interface NSString(SHA) 16 | -(NSString *) sha1; 17 | -(NSString *) sha224; 18 | -(NSString *) sha256; 19 | -(NSString *) sha384; 20 | -(NSString *) sha512; 21 | @end 22 | -------------------------------------------------------------------------------- /BCFunctionTest/BCGenerator/NSString+SHA.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+SHA.m 3 | // textDemo 4 | // 5 | // Created by caobo56 on 2018/4/25. 6 | // Copyright © 2018年 dahua. All rights reserved. 7 | // 8 | 9 | #import "NSString+SHA.h" 10 | 11 | @implementation NSString(SHA) 12 | 13 | - (NSString*) sha1 14 | { 15 | const char *cstr = [self cStringUsingEncoding:NSUTF8StringEncoding]; 16 | NSData *data = [NSData dataWithBytes:cstr length:self.length]; 17 | 18 | uint8_t digest[CC_SHA1_DIGEST_LENGTH]; 19 | 20 | CC_SHA1(data.bytes, (CC_LONG)data.length, digest); 21 | 22 | NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2]; 23 | 24 | for(int i = 0; i < CC_SHA1_DIGEST_LENGTH; i++) 25 | [output appendFormat:@"%02x", digest[i]]; 26 | 27 | return output; 28 | } 29 | 30 | - (NSString*) sha224 31 | { 32 | const char *cstr = [self cStringUsingEncoding:NSUTF8StringEncoding]; 33 | NSData *data = [NSData dataWithBytes:cstr length:self.length]; 34 | 35 | uint8_t digest[CC_SHA224_DIGEST_LENGTH]; 36 | 37 | CC_SHA224(data.bytes, (CC_LONG)data.length, digest); 38 | 39 | NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA224_DIGEST_LENGTH * 2]; 40 | 41 | for(int i = 0; i < CC_SHA224_DIGEST_LENGTH; i++) 42 | [output appendFormat:@"%02x", digest[i]]; 43 | 44 | return output; 45 | } 46 | 47 | - (NSString*) sha256 48 | { 49 | const char *cstr = [self cStringUsingEncoding:NSUTF8StringEncoding]; 50 | NSData *data = [NSData dataWithBytes:cstr length:self.length]; 51 | 52 | uint8_t digest[CC_SHA256_DIGEST_LENGTH]; 53 | 54 | CC_SHA256(data.bytes, (CC_LONG)data.length, digest); 55 | 56 | NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA256_DIGEST_LENGTH * 2]; 57 | 58 | for(int i = 0; i < CC_SHA256_DIGEST_LENGTH; i++) 59 | [output appendFormat:@"%02x", digest[i]]; 60 | 61 | return output; 62 | } 63 | 64 | - (NSString*) sha384 65 | { 66 | const char *cstr = [self cStringUsingEncoding:NSUTF8StringEncoding]; 67 | NSData *data = [NSData dataWithBytes:cstr length:self.length]; 68 | 69 | uint8_t digest[CC_SHA384_DIGEST_LENGTH]; 70 | 71 | CC_SHA384(data.bytes, (CC_LONG)data.length, digest); 72 | 73 | NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA384_DIGEST_LENGTH * 2]; 74 | 75 | for(int i = 0; i < CC_SHA384_DIGEST_LENGTH; i++) 76 | [output appendFormat:@"%02x", digest[i]]; 77 | 78 | return output; 79 | } 80 | 81 | - (NSString*) sha512 82 | { 83 | const char *cstr = [self cStringUsingEncoding:NSUTF8StringEncoding]; 84 | NSData *data = [NSData dataWithBytes:cstr length:self.length]; 85 | 86 | uint8_t digest[CC_SHA512_DIGEST_LENGTH]; 87 | 88 | CC_SHA512(data.bytes, (CC_LONG)data.length, digest); 89 | 90 | NSMutableString* output = [NSMutableString stringWithCapacity:CC_SHA512_DIGEST_LENGTH * 2]; 91 | 92 | for(int i = 0; i < CC_SHA512_DIGEST_LENGTH; i++) 93 | [output appendFormat:@"%02x", digest[i]]; 94 | 95 | return output; 96 | } 97 | 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /BCFunctionTest/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '8.0' 3 | # Uncomment this line if you're using Swift 4 | project 'BCFunctionTest.xcodeproj' 5 | 6 | 7 | # 去掉由pod引入的第三方库的警告,需要更新命令才生效 8 | inhibit_all_warnings! 9 | 10 | target 'BCFunctionTest' do 11 | 12 | pod 'CBSecp256k1' 13 | pod 'CBBase58' 14 | 15 | 16 | end 17 | 18 | 19 | -------------------------------------------------------------------------------- /BCFunctionTest/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CBBase58 (0.9.1): 3 | - OpenSSL-Universal 4 | - CBSecp256k1 (0.9.0) 5 | - OpenSSL-Universal (1.0.2.13) 6 | 7 | DEPENDENCIES: 8 | - CBBase58 9 | - CBSecp256k1 10 | 11 | SPEC REPOS: 12 | https://github.com/cocoapods/specs.git: 13 | - CBBase58 14 | - CBSecp256k1 15 | - OpenSSL-Universal 16 | 17 | SPEC CHECKSUMS: 18 | CBBase58: a86f26f59eaf3fbba2d9b81e3ef5b02563cdab3d 19 | CBSecp256k1: d8a1c651b1e5dd1c35867e968ab4e7fd2430e4de 20 | OpenSSL-Universal: 401888162f11c33ebbd46f782d9229da35c61327 21 | 22 | PODFILE CHECKSUM: e0c21496ccd43fbe0e4159e837e13c1aff638d9c 23 | 24 | COCOAPODS: 1.5.3 25 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBBase58/CBBase58/base58/BTCBase58.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #import 4 | 5 | // Base58 is used for compact human-friendly representation of Bitcoin addresses and private keys. 6 | // Typically Base58-encoded text also contains a checksum. 7 | // Addresses look like 19FGfswVqxNubJbh1NW8A4t51T9x9RDVWQ 8 | // Private keys look like 5KQntKuhYWSRXNqp2yhdXzjekYAR7US3MT1715Mbv5CyUKV6hVe 9 | // 10 | // Here is what Satoshi said about Base58: 11 | // Why base-58 instead of standard base-64 encoding? 12 | // - Don't want 0OIl characters that look the same in some fonts and 13 | // could be used to create visually identical looking account numbers. 14 | // - A string with non-alphanumeric characters is not as easily accepted as an account number. 15 | // - E-mail usually won't line-break if there's no punctuation to break at. 16 | // - Double-clicking selects the whole number as one word if it's all alphanumeric. 17 | 18 | 19 | // See NS+BTCBase58.h for easy to use categories. 20 | 21 | // Returns data for a Base58 string without checksum 22 | // Data is mutable so you can clear sensitive information as soon as possible. 23 | NSMutableData* BTCDataFromBase58(NSString* string); 24 | NSMutableData* BTCDataFromBase58CString(const char* cstring); 25 | 26 | // Returns data for a Base58 string with checksum 27 | NSMutableData* BTCDataFromBase58Check(NSString* string); 28 | NSMutableData* BTCDataFromBase58CheckCString(const char* cstring); 29 | 30 | // String in Base58 without checksum, you need to free it yourself. 31 | // It's mutable so you can clear it securely yourself. 32 | char* BTCBase58CStringWithData(NSData* data); 33 | 34 | // Same as above, but returns an immutable autoreleased string. Suitable for non-sensitive data. 35 | NSString* BTCBase58StringWithData(NSData* data); 36 | 37 | // String in Base58 with checksum, you need to free it yourself. 38 | // It's mutable so you can clear it securely yourself. 39 | char* BTCBase58CheckCStringWithData(NSData* data); 40 | 41 | // Same as above, but returns an immutable autoreleased string. Suitable for non-sensitive data. 42 | NSString* BTCBase58CheckStringWithData(NSData* data); 43 | 44 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBBase58/CBBase58/base58/NS+BTCBase58.h: -------------------------------------------------------------------------------- 1 | // CoreBitcoin by Oleg Andreev , WTFPL. 2 | 3 | #import 4 | #import "BTCBase58.h" 5 | 6 | // These categories are optional and provided for convenience only. 7 | // For documentation look into BTCBase58.h. 8 | // They are also used in CoreBitcoin unit tests. 9 | @interface NSString (BTCBase58) 10 | 11 | // Returns data for Base58 string without checksum 12 | // Data is mutable so you can clear sensitive information as soon as possible. 13 | - (NSMutableData*) dataFromBase58; 14 | 15 | // Returns data for Base58 string with checksum 16 | - (NSMutableData*) dataFromBase58Check; 17 | 18 | @end 19 | 20 | @interface NSMutableData (BTCBase58) 21 | 22 | // Returns data for Base58 string without checksum 23 | // Data is mutable so you can clear sensitive information as soon as possible. 24 | + (NSMutableData*) dataFromBase58CString:(const char*)cstring; 25 | 26 | // Returns data for Base58 string with checksum 27 | + (NSMutableData*) dataFromBase58CheckCString:(const char*)cstring; 28 | 29 | @end 30 | 31 | @interface NSData (BTCBase58) 32 | 33 | // String in Base58 without checksum, you need to free it yourself. 34 | // It's mutable so you can clear it securely yourself. 35 | - (char*) base58CString; 36 | 37 | // String in Base58 with checksum, you need to free it yourself. 38 | // It's mutable so you can clear it securely yourself. 39 | - (char*) base58CheckCString; 40 | 41 | // String in Base58 without checksum 42 | - (NSString*) base58String; 43 | 44 | // String in Base58 with checksum 45 | - (NSString*) base58CheckString; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBBase58/CBBase58/base58/NS+BTCBase58.m: -------------------------------------------------------------------------------- 1 | // Oleg Andreev 2 | 3 | #import "NS+BTCBase58.h" 4 | 5 | // TODO. 6 | 7 | @implementation NSString (BTCBase58) 8 | 9 | - (NSMutableData*) dataFromBase58 { return BTCDataFromBase58(self); } 10 | - (NSMutableData*) dataFromBase58Check { return BTCDataFromBase58Check(self); } 11 | @end 12 | 13 | 14 | @implementation NSMutableData (BTCBase58) 15 | 16 | + (NSMutableData*) dataFromBase58CString:(const char*)cstring { 17 | return BTCDataFromBase58CString(cstring); 18 | } 19 | 20 | + (NSMutableData*) dataFromBase58CheckCString:(const char*)cstring { 21 | return BTCDataFromBase58CheckCString(cstring); 22 | } 23 | 24 | @end 25 | 26 | 27 | @implementation NSData (BTCBase58) 28 | 29 | - (char*) base58CString { 30 | return BTCBase58CStringWithData(self); 31 | } 32 | 33 | - (char*) base58CheckCString { 34 | return BTCBase58CheckCStringWithData(self); 35 | } 36 | 37 | - (NSString*) base58String { 38 | return BTCBase58StringWithData(self); 39 | } 40 | 41 | - (NSString*) base58CheckString { 42 | return BTCBase58CheckStringWithData(self); 43 | } 44 | 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBBase58/CBBase58/base58/NSData+Hashing.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Hashing.h 3 | // BitcoinSwift 4 | // 5 | // Created by Kevin Greene on 6/19/14. 6 | // Copyright (c) 2014 DoubleSha. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (Hashing) 12 | 13 | /// Returns the SHA-256 hash of self. 14 | - (NSData *)SHA256Hash; 15 | 16 | /// Returns the RIPEMD-160 hash of self. 17 | - (NSData *)RIPEMD160Hash; 18 | 19 | /// Performs the HMAC512-SHA256 algorithm on self using key and stores the result in digest. 20 | - (void)HMACSHA512WithKey:(NSData *)key digest:(NSMutableData *)digest; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBBase58/CBBase58/base58/NSData+Hashing.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Hashing.m 3 | // BitcoinSwift 4 | // 5 | // Created by Kevin Greene on 6/19/14. 6 | // Copyright (c) 2014 DoubleSha. All rights reserved. 7 | // 8 | 9 | #import "NSData+Hashing.h" 10 | 11 | #import 12 | #import 13 | #import 14 | 15 | @implementation NSData (Hashing) 16 | 17 | - (NSData *)SHA256Hash { 18 | SHA256_CTX ctx; 19 | unsigned char hash[32]; 20 | SHA256_Init(&ctx); 21 | SHA256_Update(&ctx, self.bytes, self.length); 22 | SHA256_Final(hash, &ctx); 23 | return [NSData dataWithBytes:hash length:32]; 24 | } 25 | 26 | - (NSData *)RIPEMD160Hash { 27 | RIPEMD160_CTX ctx; 28 | unsigned char hash[20]; 29 | RIPEMD160_Init(&ctx); 30 | RIPEMD160_Update(&ctx, self.bytes, self.length); 31 | RIPEMD160_Final(hash, &ctx); 32 | return [NSData dataWithBytes:hash length:20]; 33 | } 34 | 35 | - (void)HMACSHA512WithKey:(NSData *)key digest:(NSMutableData *)digest { 36 | unsigned int length = 64; 37 | NSAssert(digest.length == 64, @"Invalid output length for HMACSHA512"); 38 | HMAC(EVP_sha512(), 39 | key.bytes, 40 | (int)key.length, 41 | self.bytes, 42 | (int)self.length, 43 | [digest mutableBytes], 44 | &length); 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBBase58/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 caobo56 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBBase58/README.md: -------------------------------------------------------------------------------- 1 | # CBBase58 2 | 从 CoreBitcoin 项目摘出来的base58部分代码,可以直接引用Base58 3 | 4 | 创建该repo 是因为公司区块链项目需要用到base58,但在pod和github上又没找到合适的库 5 | 6 | 于是自己创建一个,方便项目集成 7 | 8 | 其实 CoreBitcoin项目中有其他与区块链相关的更为完整的pod库 9 | 10 | 但我不需要那么多,万一其他类别的项目也用到了base58,可以简单的集成CBBase58就可以了 11 | 12 | ### CoreBitcoin项目地址 13 | https://github.com/oleganza/CoreBitcoin 14 | 15 | ### 使用方法 16 | ``` 17 | pod 'CBBase58' 18 | ``` 19 | ### base58的查询字母表 20 | 21 | 我的CBBase58 是从CoreBitcoin摘出来的,CoreBitcoin是比特币的pod库,他的base58 最后查询的字母表与比特币的保持一致,如果有更改的需要,可以从github上下载代码并修改。 22 | 23 | 修改代码的位置为: 24 | BTCBase58.m 25 | ``` 26 | static const char* BTCBase58Alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; 27 | ``` 28 | 29 | # 关于base58 30 | base58和base64一样是一种二进制转可视字符串的算法,主要用来转换大整数值。区别是,转换出来的字符串,去除了几个看起来会产生歧义的字符,如 0 (零), O (大写字母O), I (大写的字母i) and l (小写的字母L) ,和几个影响双击选择的字符,如/, +。结果字符集正好58个字符(包括9个数字,24个大写字母,25个小写字母)。不同的应用实现中,base58 最后查询的字母表可能不同,所以没有具体的标准。 31 | 32 | 比特币之所以加入改进版的 Base58 算法,主要为了解决 Base58 导出的字符串没有校验机制,这样,在传播过程中,如果漏写了几个字符,会检测不出来。所以使用了改进版的算法 Base58Check。 33 | 34 | 下面是几个应用中的字母表: 35 | 36 | 比特币地址 37 | ``` 38 | 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz 39 | ``` 40 | Monero 地址 41 | ``` 42 | 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz 43 | ``` 44 | Ripple 地址 45 | ``` 46 | rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz 47 | ``` 48 | Flickr 的短URL 49 | ``` 50 | 123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ 51 | ``` 52 | 53 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBSecp256k1/CBSecp256k1/secp256k1/CBSecp256k1.h: -------------------------------------------------------------------------------- 1 | // 2 | // CKScep256k1.h 3 | // CKScep256k1 4 | // 5 | // Created by caobo56 on 2017/8/17. 6 | // Copyright © 2017年 caobo56. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CBSecp256k1 : NSObject 12 | 13 | /** 14 | 根据公钥生成私钥 15 | 16 | @param privateKeyData 私钥 NSdata类型(二进制数据类型) 17 | @param isCompression 是否压缩 description 18 | @return return value 由私钥生成的公钥 19 | */ 20 | + (NSData *)generatePublicKeyWithPrivateKey:(NSData *)privateKeyData compression:(BOOL)isCompression; 21 | 22 | /** 23 | 根据私钥生成数据的签名数据 24 | 25 | @param msgData msgData 生成的数据 26 | @param privateKeyData 私钥 NSdata类型(二进制数据类型) 27 | @return return value 签名数据 28 | */ 29 | + (NSData *)compactSignData:(NSData *)msgData withPrivateKey:(NSData *)privateKeyData; 30 | 31 | /** 32 | 用公钥验证签名 33 | 34 | @param sigData 签名的数据 35 | @param msgData 原数据 36 | @param pubKeyData 公钥 37 | @return 1 OK;0 不正确;-3 公钥读取失败;-4 签名读取失败 38 | */ 39 | + (NSInteger)verifySignedData:(NSData *)sigData withMessageData:(NSData *)msgData usePublickKey:(NSData *)pubKeyData; 40 | @end 41 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBSecp256k1/CBSecp256k1/secp256k1/CBSecp256k1.m: -------------------------------------------------------------------------------- 1 | // 2 | // CKScep256k1.m 3 | // CKScep256k1 4 | // 5 | // Created by caobo56 on 2017/8/17. 6 | // Copyright © 2017年 caobo56. All rights reserved. 7 | // 8 | 9 | #import "CBSecp256k1.h" 10 | #import 11 | #import "NSData+HexString.h" 12 | 13 | @implementation CBSecp256k1 14 | + (NSData *)generatePublicKeyWithPrivateKey:(NSData *)privateKeyData compression:(BOOL)isCompression 15 | { 16 | secp256k1_context *context = secp256k1_context_create(SECP256K1_CONTEXT_SIGN); 17 | 18 | const unsigned char *prvKey = (const unsigned char *)privateKeyData.bytes; 19 | secp256k1_pubkey pKey; 20 | 21 | int result = secp256k1_ec_pubkey_create(context, &pKey, prvKey); 22 | if (result != 1) { 23 | return nil; 24 | } 25 | 26 | int size = isCompression ? 33 : 65; 27 | unsigned char *pubkey = malloc(size); 28 | 29 | size_t s = size; 30 | 31 | result = secp256k1_ec_pubkey_serialize(context, pubkey, &s, &pKey, isCompression ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED); 32 | if (result != 1) { 33 | return nil; 34 | } 35 | 36 | secp256k1_context_destroy(context); 37 | 38 | NSMutableData *data = [NSMutableData dataWithBytes:pubkey length:size]; 39 | free(pubkey); 40 | return data; 41 | } 42 | 43 | + (NSData *)compactSignData:(NSData *)msgData withPrivateKey:(NSData *)privateKeyData 44 | { 45 | secp256k1_context *context = secp256k1_context_create(SECP256K1_CONTEXT_SIGN); 46 | 47 | const unsigned char *prvKey = (const unsigned char *)privateKeyData.bytes; 48 | const unsigned char *msg = (const unsigned char *)msgData.bytes; 49 | 50 | unsigned char *siga = malloc(64); 51 | secp256k1_ecdsa_signature sig; 52 | int result = secp256k1_ecdsa_sign(context, &sig, msg, prvKey, NULL, NULL); 53 | 54 | result = secp256k1_ecdsa_signature_serialize_compact(context, siga, &sig); 55 | 56 | if (result != 1) { 57 | return nil; 58 | } 59 | 60 | secp256k1_context_destroy(context); 61 | 62 | NSMutableData *data = [NSMutableData dataWithBytes:siga length:64]; 63 | free(siga); 64 | return data; 65 | } 66 | 67 | + (NSInteger)verifySignedData:(NSData *)sigData withMessageData:(NSData *)msgData usePublickKey:(NSData *)pubKeyData 68 | { 69 | secp256k1_context *context = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY | SECP256K1_CONTEXT_SIGN); 70 | 71 | const unsigned char *sig = (const unsigned char *)sigData.bytes; 72 | const unsigned char *msg = (const unsigned char *)msgData.bytes; 73 | 74 | const unsigned char *pubKey = (const unsigned char *)pubKeyData.bytes; 75 | 76 | secp256k1_pubkey pKey; 77 | int pubResult = secp256k1_ec_pubkey_parse(context, &pKey, pubKey, pubKeyData.length); 78 | if (pubResult != 1) return -3; 79 | 80 | secp256k1_ecdsa_signature sig_ecdsa; 81 | int sigResult = secp256k1_ecdsa_signature_parse_compact(context, &sig_ecdsa, sig); 82 | if (sigResult != 1) return -4; 83 | 84 | int result = secp256k1_ecdsa_verify(context, &sig_ecdsa, msg, &pKey); 85 | 86 | secp256k1_context_destroy(context); 87 | return result; 88 | } 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBSecp256k1/CBSecp256k1/secp256k1/NSData+HexString.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+HexString.h 3 | // ASKSecp256k1 4 | // 5 | // Created by caobo56 on 2017/8/18. 6 | // Copyright © 2017年 caobo56. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (HexString) 12 | - (NSString *)dataToHexString; 13 | + (NSData *)hexStringToData:(NSString *)hexString; 14 | @end 15 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBSecp256k1/CBSecp256k1/secp256k1/NSData+HexString.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+HexString.m 3 | // ASKSecp256k1 4 | // 5 | // Created by caobo56 on 2017/8/18. 6 | // Copyright © 2017年 caobo56. All rights reserved. 7 | // 8 | 9 | #import "NSData+HexString.h" 10 | 11 | @implementation NSData (HexString) 12 | 13 | + (NSData *)hexStringToData:(NSString *)hexString 14 | { 15 | const char *chars = [hexString UTF8String]; 16 | int i = 0; 17 | int len = (int)hexString.length; 18 | NSMutableData *data = [NSMutableData dataWithCapacity:len/2]; 19 | char byteChars[3] = {'\0','\0','\0'}; 20 | unsigned long wholeByte; 21 | 22 | while (i 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | secp256k1 9 | CFBundleIdentifier 10 | org.secp256k1lib 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBSecp256k1/CBSecp256k1/secp256k1/secp256k1.framework/Versions/A/secp256k1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caobo56/BCGenerator/2dd9228c9f0d9cb245c9825e9302aed63323c388/BCFunctionTest/Pods/CBSecp256k1/CBSecp256k1/secp256k1/secp256k1.framework/Versions/A/secp256k1 -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBSecp256k1/CBSecp256k1/secp256k1/secp256k1.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBSecp256k1/CBSecp256k1/secp256k1/secp256k1.framework/secp256k1: -------------------------------------------------------------------------------- 1 | Versions/Current/secp256k1 -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBSecp256k1/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 caobo56 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/CBSecp256k1/README.md: -------------------------------------------------------------------------------- 1 | # CBSecp256k1 2 | CBSecp256k1,椭圆双曲线算法,from ASKSecp256k1 3 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/CBBase58/BTCBase58.h: -------------------------------------------------------------------------------- 1 | ../../../CBBase58/CBBase58/base58/BTCBase58.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/CBBase58/BTCData.h: -------------------------------------------------------------------------------- 1 | ../../../CBBase58/CBBase58/base58/BTCData.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/CBBase58/NS+BTCBase58.h: -------------------------------------------------------------------------------- 1 | ../../../CBBase58/CBBase58/base58/NS+BTCBase58.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/CBBase58/NSData+Hashing.h: -------------------------------------------------------------------------------- 1 | ../../../CBBase58/CBBase58/base58/NSData+Hashing.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/CBSecp256k1/CBSecp256k1.h: -------------------------------------------------------------------------------- 1 | ../../../CBSecp256k1/CBSecp256k1/secp256k1/CBSecp256k1.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/CBSecp256k1/NSData+HexString.h: -------------------------------------------------------------------------------- 1 | ../../../CBSecp256k1/CBSecp256k1/secp256k1/NSData+HexString.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/aes.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/aes.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/asn1.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/asn1.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/asn1_mac.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/asn1_mac.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/asn1t.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/asn1t.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/bio.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/bio.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/blowfish.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/blowfish.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/bn.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/bn.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/buffer.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/camellia.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/camellia.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/cast.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/cast.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/cmac.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/cmac.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/cms.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/cms.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/comp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/comp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/conf.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/conf.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/conf_api.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/crypto.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/crypto.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/des.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/des.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/des_old.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/des_old.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/dh.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/dh.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/dsa.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/dsa.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/dso.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/dso.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/dtls1.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/dtls1.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/e_os2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/e_os2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ebcdic.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ec.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ec.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ecdh.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ecdsa.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ecdsa.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/engine.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/engine.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/err.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/err.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/evp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/evp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/hmac.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/idea.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/idea.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/krb5_asn.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/krb5_asn.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/kssl.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/kssl.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/lhash.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/lhash.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/md4.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/md4.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/md5.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/md5.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/mdc2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/mdc2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/modes.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/modes.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/obj_mac.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/obj_mac.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/objects.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/objects.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ocsp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ocsp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/opensslconf.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/opensslconf.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/opensslv.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ossl_typ.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ossl_typ.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/pem.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pem.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pem2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/pkcs12.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pkcs12.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/pkcs7.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pkcs7.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/pqueue.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pqueue.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/rand.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/rand.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/rc2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/rc4.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ripemd.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/rsa.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/rsa.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/safestack.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/safestack.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/seed.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/seed.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/sha.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/sha.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/srp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/srp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/srtp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/srtp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ssl.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ssl.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ssl2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ssl2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ssl23.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ssl23.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ssl3.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ssl3.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/stack.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/stack.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/symhacks.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/symhacks.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/tls1.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/tls1.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ts.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ts.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/txt_db.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ui.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ui.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/ui_compat.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ui_compat.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/whrlpool.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/x509.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/x509.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/x509_vfy.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/x509_vfy.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Private/OpenSSL-Universal/openssl/x509v3.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/x509v3.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/CBBase58/BTCBase58.h: -------------------------------------------------------------------------------- 1 | ../../../CBBase58/CBBase58/base58/BTCBase58.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/CBBase58/BTCData.h: -------------------------------------------------------------------------------- 1 | ../../../CBBase58/CBBase58/base58/BTCData.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/CBBase58/NS+BTCBase58.h: -------------------------------------------------------------------------------- 1 | ../../../CBBase58/CBBase58/base58/NS+BTCBase58.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/CBBase58/NSData+Hashing.h: -------------------------------------------------------------------------------- 1 | ../../../CBBase58/CBBase58/base58/NSData+Hashing.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/CBSecp256k1/CBSecp256k1.h: -------------------------------------------------------------------------------- 1 | ../../../CBSecp256k1/CBSecp256k1/secp256k1/CBSecp256k1.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/CBSecp256k1/NSData+HexString.h: -------------------------------------------------------------------------------- 1 | ../../../CBSecp256k1/CBSecp256k1/secp256k1/NSData+HexString.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/CBSecp256k1/secp256k1/secp256k1.h: -------------------------------------------------------------------------------- 1 | ../../../../CBSecp256k1/CBSecp256k1/secp256k1/secp256k1.framework/Versions/A/Headers/secp256k1.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/CBSecp256k1/secp256k1/secp256k1_recovery.h: -------------------------------------------------------------------------------- 1 | ../../../../CBSecp256k1/CBSecp256k1/secp256k1/secp256k1.framework/Versions/A/Headers/secp256k1_recovery.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/aes.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/aes.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/asn1.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/asn1.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/asn1_mac.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/asn1_mac.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/asn1t.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/asn1t.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/bio.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/bio.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/blowfish.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/blowfish.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/bn.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/bn.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/buffer.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/camellia.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/camellia.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/cast.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/cast.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/cmac.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/cmac.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/cms.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/cms.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/comp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/comp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/conf.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/conf.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/conf_api.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/crypto.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/crypto.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/des.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/des.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/des_old.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/des_old.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/dh.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/dh.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/dsa.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/dsa.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/dso.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/dso.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/dtls1.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/dtls1.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/e_os2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/e_os2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ebcdic.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ec.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ec.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ecdh.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ecdsa.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ecdsa.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/engine.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/engine.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/err.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/err.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/evp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/evp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/hmac.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/idea.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/idea.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/krb5_asn.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/krb5_asn.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/kssl.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/kssl.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/lhash.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/lhash.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/md4.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/md4.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/md5.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/md5.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/mdc2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/mdc2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/modes.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/modes.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/obj_mac.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/obj_mac.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/objects.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/objects.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ocsp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ocsp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/opensslconf.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/opensslconf.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/opensslv.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ossl_typ.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ossl_typ.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/pem.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pem.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pem2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/pkcs12.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pkcs12.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/pkcs7.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pkcs7.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/pqueue.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/pqueue.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/rand.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/rand.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/rc2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/rc4.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ripemd.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/rsa.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/rsa.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/safestack.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/safestack.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/seed.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/seed.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/sha.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/sha.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/srp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/srp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/srtp.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/srtp.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ssl.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ssl.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ssl2.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ssl2.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ssl23.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ssl23.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ssl3.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ssl3.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/stack.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/stack.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/symhacks.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/symhacks.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/tls1.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/tls1.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ts.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ts.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/txt_db.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ui.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ui.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/ui_compat.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/ui_compat.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/whrlpool.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/x509.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/x509.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/x509_vfy.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/x509_vfy.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Headers/Public/OpenSSL-Universal/openssl/x509v3.h: -------------------------------------------------------------------------------- 1 | ../../../../OpenSSL-Universal/include-ios/openssl/x509v3.h -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CBBase58 (0.9.1): 3 | - OpenSSL-Universal 4 | - CBSecp256k1 (0.9.0) 5 | - OpenSSL-Universal (1.0.2.13) 6 | 7 | DEPENDENCIES: 8 | - CBBase58 9 | - CBSecp256k1 10 | 11 | SPEC REPOS: 12 | https://github.com/cocoapods/specs.git: 13 | - CBBase58 14 | - CBSecp256k1 15 | - OpenSSL-Universal 16 | 17 | SPEC CHECKSUMS: 18 | CBBase58: a86f26f59eaf3fbba2d9b81e3ef5b02563cdab3d 19 | CBSecp256k1: d8a1c651b1e5dd1c35867e968ab4e7fd2430e4de 20 | OpenSSL-Universal: 401888162f11c33ebbd46f782d9229da35c61327 21 | 22 | PODFILE CHECKSUM: e0c21496ccd43fbe0e4159e837e13c1aff638d9c 23 | 24 | COCOAPODS: 1.5.3 25 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/README.md: -------------------------------------------------------------------------------- 1 | OpenSSL-Universal 2 | ======= 3 | 4 | OpenSSL CocoaPod for iOS and OSX. Complete solution to OpenSSL on iOS and OSX. Package came with precompiled libraries, and include script to build newer version if necessary. 5 | 6 | Current version contains binaries build with SDK iOS 8.0 (target 6.0), and SDK OSX 10.9 (target 10.8) for all supported architectures. 7 | 8 | **Architectures** 9 | 10 | - iOS with architectures: armv7, armv7s, arm64 + simulator (i386, x86_64) 11 | - OSX with architectures: i386, x86_64 12 | 13 | **Why?** 14 | 15 | [Apple says](https://developer.apple.com/library/mac/documentation/security/Conceptual/cryptoservices/GeneralPurposeCrypto/GeneralPurposeCrypto.html): 16 | "Although OpenSSL is commonly used in the open source community, OpenSSL does not provide a stable API from version to version. For this reason, although OS X provides OpenSSL libraries, the OpenSSL libraries in OS X are deprecated, and OpenSSL has never been provided as part of iOS." 17 | 18 | **Installation** 19 | 20 | ```` 21 | pod 'OpenSSL-Universal' 22 | ```` 23 | 24 | Or always latest version 25 | 26 | ```` 27 | pod 'OpenSSL-Universal', :git => 'https://github.com/krzyzanowskim/OpenSSL.git', :branch => :master 28 | ```` 29 | 30 | **Authors** 31 | 32 | [Marcin Krzyżanowski](https://twitter.com/krzyzanowskim) 33 | 34 | **Tutorial ** 35 | This tutorial assumes you want to: 36 | 1) Write a C application. 37 | 2) Use OpenSSL libraries for some crypto operation. 38 | 3) Use a Mac and xCode 8. 39 | 4) Use CocoaPods and the OpenSSL-Universal pod as an elegant way to stay updated with the latest libraries and headers. 40 | 41 | *** Step 1 - Create your macOS HelloWorld C app *** 42 | If you have not done this before with xCode, select `File / New Project / macOS / Command Line Tool`. Hit build and run. You just successfully build the default Hello World C project. 43 | 44 | *** Step 2 - Setup Cocoa Pods *** 45 | Make sure your machine is setup for CocoaPods. 46 | After CocoaPods is setup, open `Terminal` and navigate to your project folder and run `pod init`. 47 | After that has completed, type `open -a Xcode Podfile`. 48 | 49 | *** Step 3 - get the OpenSSL-Universal pod *** 50 | Add `pod 'OpenSSL-Universal'` inside the podfile. 51 | Save the file. 52 | Return to `Terminal` and run `Pod Install`. 53 | After that download completes, make sure to close the C project and open the workspace file that was created. 54 | 55 | *** Step 4 - What is inside of the OpenSSL-Universal pod?*** 56 | Once this successfully completed, you have now got access to a pre-compiled version of the static OpenSSL libraries and the C header files required to call these functions. 57 | 58 | *** Where can I use OpenSSL-Universal?*** 59 | These libraries work for both iOS and MacOS. There are two OpenSSL static libraries; `libcrypto.a` and `libssl.a` 

::Do NOT expect these OpenSSL files to work on every CPU architecture in the world. It is your prerogative to check. Ask yourself, are you trying to write an app for old devices? new devices only? all iOS devices? only macOS?, etc :: 60 | 61 | ***Fat Binaries*** 62 | The OpenSSL-Universal Framework is a Fat Binary. That means it supports multiple CPU architectures in a single file. 

To understand this, return to `Terminal`. Navigate to your OpenSSL-Universal macOS files and run the command `file libcrypto.a` This will tell you architecture the file is compiled against `x86_64` and `x386`. If you tried the iOS OpenSSL-Universal files it would have said `armv7`, `armv7s`, `arm64` + Simulators (`i386, x86_64`). 63 | 64 | ***xCode Setup*** 65 | You want to ensure xCode knows; 66 | 67 | 1. Where the OpenSSL static libraries are located. 68 | 2. Where the OpenSSL header files are located for the C include statements.
 69 | Inside your workspace, go to the Target (not the Project). The Target is the C app that is produced after a successful build.

Select `Build Phases` and `Link Binary With Libraries`. 

Select `+` and navigate to the static OpenSSL libraries that was included in the framework. The magical result was, your `Target` and `Building Settings` `Library Search Paths` were populated without you typing anything.

Now go to the Target. In `Build Settings` set the `Always Search User Paths` to `Yes`.

Then add a new entry to the `User Header Search Paths`. This should be the location of the OpenSSL header files that were included in OpenSSLUniversal. 70 | 71 | ***Test your app builds: include OpenSSL Header file *** 72 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/cast.h: -------------------------------------------------------------------------------- 1 | /* crypto/cast/cast.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CAST_H 60 | # define HEADER_CAST_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | # include 67 | 68 | # ifdef OPENSSL_NO_CAST 69 | # error CAST is disabled. 70 | # endif 71 | 72 | # define CAST_ENCRYPT 1 73 | # define CAST_DECRYPT 0 74 | 75 | # define CAST_LONG unsigned int 76 | 77 | # define CAST_BLOCK 8 78 | # define CAST_KEY_LENGTH 16 79 | 80 | typedef struct cast_key_st { 81 | CAST_LONG data[32]; 82 | int short_key; /* Use reduced rounds for short key */ 83 | } CAST_KEY; 84 | 85 | # ifdef OPENSSL_FIPS 86 | void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 87 | # endif 88 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 89 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, 90 | const CAST_KEY *key, int enc); 91 | void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); 92 | void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); 93 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, 94 | long length, const CAST_KEY *ks, unsigned char *iv, 95 | int enc); 96 | void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 97 | long length, const CAST_KEY *schedule, 98 | unsigned char *ivec, int *num, int enc); 99 | void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 100 | long length, const CAST_KEY *schedule, 101 | unsigned char *ivec, int *num); 102 | 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif 108 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/cmac.h: -------------------------------------------------------------------------------- 1 | /* crypto/cmac/cmac.h */ 2 | /* 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 4 | * project. 5 | */ 6 | /* ==================================================================== 7 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. All advertising materials mentioning features or use of this 22 | * software must display the following acknowledgment: 23 | * "This product includes software developed by the OpenSSL Project 24 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 25 | * 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 | * endorse or promote products derived from this software without 28 | * prior written permission. For written permission, please contact 29 | * licensing@OpenSSL.org. 30 | * 31 | * 5. Products derived from this software may not be called "OpenSSL" 32 | * nor may "OpenSSL" appear in their names without prior written 33 | * permission of the OpenSSL Project. 34 | * 35 | * 6. Redistributions of any form whatsoever must retain the following 36 | * acknowledgment: 37 | * "This product includes software developed by the OpenSSL Project 38 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * ==================================================================== 53 | */ 54 | 55 | #ifndef HEADER_CMAC_H 56 | # define HEADER_CMAC_H 57 | 58 | #ifdef __cplusplus 59 | extern "C" { 60 | #endif 61 | 62 | # include 63 | 64 | /* Opaque */ 65 | typedef struct CMAC_CTX_st CMAC_CTX; 66 | 67 | CMAC_CTX *CMAC_CTX_new(void); 68 | void CMAC_CTX_cleanup(CMAC_CTX *ctx); 69 | void CMAC_CTX_free(CMAC_CTX *ctx); 70 | EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); 71 | int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); 72 | 73 | int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, 74 | const EVP_CIPHER *cipher, ENGINE *impl); 75 | int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); 76 | int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); 77 | int CMAC_resume(CMAC_CTX *ctx); 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/comp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef HEADER_COMP_H 3 | # define HEADER_COMP_H 4 | 5 | # include 6 | 7 | # ifdef OPENSSL_NO_COMP 8 | # error COMP is disabled. 9 | # endif 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef struct comp_ctx_st COMP_CTX; 16 | 17 | struct comp_method_st { 18 | int type; /* NID for compression library */ 19 | const char *name; /* A text string to identify the library */ 20 | int (*init) (COMP_CTX *ctx); 21 | void (*finish) (COMP_CTX *ctx); 22 | int (*compress) (COMP_CTX *ctx, 23 | unsigned char *out, unsigned int olen, 24 | unsigned char *in, unsigned int ilen); 25 | int (*expand) (COMP_CTX *ctx, 26 | unsigned char *out, unsigned int olen, 27 | unsigned char *in, unsigned int ilen); 28 | /* 29 | * The following two do NOTHING, but are kept for backward compatibility 30 | */ 31 | long (*ctrl) (void); 32 | long (*callback_ctrl) (void); 33 | }; 34 | 35 | struct comp_ctx_st { 36 | COMP_METHOD *meth; 37 | unsigned long compress_in; 38 | unsigned long compress_out; 39 | unsigned long expand_in; 40 | unsigned long expand_out; 41 | CRYPTO_EX_DATA ex_data; 42 | }; 43 | 44 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 45 | void COMP_CTX_free(COMP_CTX *ctx); 46 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 47 | unsigned char *in, int ilen); 48 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 49 | unsigned char *in, int ilen); 50 | COMP_METHOD *COMP_rle(void); 51 | COMP_METHOD *COMP_zlib(void); 52 | void COMP_zlib_cleanup(void); 53 | 54 | # ifdef HEADER_BIO_H 55 | # ifdef ZLIB 56 | BIO_METHOD *BIO_f_zlib(void); 57 | # endif 58 | # endif 59 | 60 | /* BEGIN ERROR CODES */ 61 | /* 62 | * The following lines are auto generated by the script mkerr.pl. Any changes 63 | * made after this point may be overwritten when the script is next run. 64 | */ 65 | void ERR_load_COMP_strings(void); 66 | 67 | /* Error codes for the COMP functions. */ 68 | 69 | /* Function codes. */ 70 | # define COMP_F_BIO_ZLIB_FLUSH 99 71 | # define COMP_F_BIO_ZLIB_NEW 100 72 | # define COMP_F_BIO_ZLIB_READ 101 73 | # define COMP_F_BIO_ZLIB_WRITE 102 74 | 75 | /* Reason codes. */ 76 | # define COMP_R_ZLIB_DEFLATE_ERROR 99 77 | # define COMP_R_ZLIB_INFLATE_ERROR 100 78 | # define COMP_R_ZLIB_NOT_SUPPORTED 101 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #endif 84 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | /* conf_api.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CONF_API_H 60 | # define HEADER_CONF_API_H 61 | 62 | # include 63 | # include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /* Up until OpenSSL 0.9.5a, this was new_section */ 70 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 71 | /* Up until OpenSSL 0.9.5a, this was get_section */ 72 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 73 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ 74 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 75 | const char *section); 76 | 77 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 78 | char *_CONF_get_string(const CONF *conf, const char *section, 79 | const char *name); 80 | long _CONF_get_number(const CONF *conf, const char *section, 81 | const char *name); 82 | 83 | int _CONF_new_data(CONF *conf); 84 | void _CONF_free_data(CONF *conf); 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | #endif 90 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* crypto/ebcdic.h */ 2 | 3 | #ifndef HEADER_EBCDIC_H 4 | # define HEADER_EBCDIC_H 5 | 6 | # include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /* Avoid name clashes with other applications */ 13 | # define os_toascii _openssl_os_toascii 14 | # define os_toebcdic _openssl_os_toebcdic 15 | # define ebcdic2ascii _openssl_ebcdic2ascii 16 | # define ascii2ebcdic _openssl_ascii2ebcdic 17 | 18 | extern const unsigned char os_toascii[256]; 19 | extern const unsigned char os_toebcdic[256]; 20 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 21 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* crypto/hmac/hmac.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | #ifndef HEADER_HMAC_H 59 | # define HEADER_HMAC_H 60 | 61 | # include 62 | 63 | # ifdef OPENSSL_NO_HMAC 64 | # error HMAC is disabled. 65 | # endif 66 | 67 | # include 68 | 69 | # define HMAC_MAX_MD_CBLOCK 128/* largest known is SHA512 */ 70 | 71 | #ifdef __cplusplus 72 | extern "C" { 73 | #endif 74 | 75 | typedef struct hmac_ctx_st { 76 | const EVP_MD *md; 77 | EVP_MD_CTX md_ctx; 78 | EVP_MD_CTX i_ctx; 79 | EVP_MD_CTX o_ctx; 80 | unsigned int key_length; 81 | unsigned char key[HMAC_MAX_MD_CBLOCK]; 82 | } HMAC_CTX; 83 | 84 | # define HMAC_size(e) (EVP_MD_size((e)->md)) 85 | 86 | void HMAC_CTX_init(HMAC_CTX *ctx); 87 | void HMAC_CTX_cleanup(HMAC_CTX *ctx); 88 | 89 | /* deprecated */ 90 | # define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) 91 | 92 | /* deprecated */ 93 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md); 94 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 95 | const EVP_MD *md, ENGINE *impl); 96 | int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); 97 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); 98 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 99 | const unsigned char *d, size_t n, unsigned char *md, 100 | unsigned int *md_len); 101 | int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 102 | 103 | void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 104 | 105 | #ifdef __cplusplus 106 | } 107 | #endif 108 | 109 | #endif 110 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/idea.h: -------------------------------------------------------------------------------- 1 | /* crypto/idea/idea.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_IDEA_H 60 | # define HEADER_IDEA_H 61 | 62 | # include /* IDEA_INT, OPENSSL_NO_IDEA */ 63 | 64 | # ifdef OPENSSL_NO_IDEA 65 | # error IDEA is disabled. 66 | # endif 67 | 68 | # define IDEA_ENCRYPT 1 69 | # define IDEA_DECRYPT 0 70 | 71 | # define IDEA_BLOCK 8 72 | # define IDEA_KEY_LENGTH 16 73 | 74 | #ifdef __cplusplus 75 | extern "C" { 76 | #endif 77 | 78 | typedef struct idea_key_st { 79 | IDEA_INT data[9][6]; 80 | } IDEA_KEY_SCHEDULE; 81 | 82 | const char *idea_options(void); 83 | void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, 84 | IDEA_KEY_SCHEDULE *ks); 85 | # ifdef OPENSSL_FIPS 86 | void private_idea_set_encrypt_key(const unsigned char *key, 87 | IDEA_KEY_SCHEDULE *ks); 88 | # endif 89 | void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 90 | void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 91 | void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, 92 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 93 | int enc); 94 | void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, 95 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 96 | int *num, int enc); 97 | void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, 98 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 99 | int *num); 100 | void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* crypto/md4/md4.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MD4_H 60 | # define HEADER_MD4_H 61 | 62 | # include 63 | # include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | # ifdef OPENSSL_NO_MD4 70 | # error MD4 is disabled. 71 | # endif 72 | 73 | /*- 74 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 75 | * ! MD4_LONG has to be at least 32 bits wide. If it's wider, then ! 76 | * ! MD4_LONG_LOG2 has to be defined along. ! 77 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 78 | */ 79 | 80 | # if defined(__LP32__) 81 | # define MD4_LONG unsigned long 82 | # elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 83 | # define MD4_LONG unsigned long 84 | # define MD4_LONG_LOG2 3 85 | /* 86 | * _CRAY note. I could declare short, but I have no idea what impact 87 | * does it have on performance on none-T3E machines. I could declare 88 | * int, but at least on C90 sizeof(int) can be chosen at compile time. 89 | * So I've chosen long... 90 | * 91 | */ 92 | # else 93 | # define MD4_LONG unsigned int 94 | # endif 95 | 96 | # define MD4_CBLOCK 64 97 | # define MD4_LBLOCK (MD4_CBLOCK/4) 98 | # define MD4_DIGEST_LENGTH 16 99 | 100 | typedef struct MD4state_st { 101 | MD4_LONG A, B, C, D; 102 | MD4_LONG Nl, Nh; 103 | MD4_LONG data[MD4_LBLOCK]; 104 | unsigned int num; 105 | } MD4_CTX; 106 | 107 | # ifdef OPENSSL_FIPS 108 | int private_MD4_Init(MD4_CTX *c); 109 | # endif 110 | int MD4_Init(MD4_CTX *c); 111 | int MD4_Update(MD4_CTX *c, const void *data, size_t len); 112 | int MD4_Final(unsigned char *md, MD4_CTX *c); 113 | unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); 114 | void MD4_Transform(MD4_CTX *c, const unsigned char *b); 115 | #ifdef __cplusplus 116 | } 117 | #endif 118 | 119 | #endif 120 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* crypto/md5/md5.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MD5_H 60 | # define HEADER_MD5_H 61 | 62 | # include 63 | # include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | # ifdef OPENSSL_NO_MD5 70 | # error MD5 is disabled. 71 | # endif 72 | 73 | /* 74 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 75 | * ! MD5_LONG has to be at least 32 bits wide. If it's wider, then ! 76 | * ! MD5_LONG_LOG2 has to be defined along. ! 77 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 78 | */ 79 | 80 | # if defined(__LP32__) 81 | # define MD5_LONG unsigned long 82 | # elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 83 | # define MD5_LONG unsigned long 84 | # define MD5_LONG_LOG2 3 85 | /* 86 | * _CRAY note. I could declare short, but I have no idea what impact 87 | * does it have on performance on none-T3E machines. I could declare 88 | * int, but at least on C90 sizeof(int) can be chosen at compile time. 89 | * So I've chosen long... 90 | * 91 | */ 92 | # else 93 | # define MD5_LONG unsigned int 94 | # endif 95 | 96 | # define MD5_CBLOCK 64 97 | # define MD5_LBLOCK (MD5_CBLOCK/4) 98 | # define MD5_DIGEST_LENGTH 16 99 | 100 | typedef struct MD5state_st { 101 | MD5_LONG A, B, C, D; 102 | MD5_LONG Nl, Nh; 103 | MD5_LONG data[MD5_LBLOCK]; 104 | unsigned int num; 105 | } MD5_CTX; 106 | 107 | # ifdef OPENSSL_FIPS 108 | int private_MD5_Init(MD5_CTX *c); 109 | # endif 110 | int MD5_Init(MD5_CTX *c); 111 | int MD5_Update(MD5_CTX *c, const void *data, size_t len); 112 | int MD5_Final(unsigned char *md, MD5_CTX *c); 113 | unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); 114 | void MD5_Transform(MD5_CTX *c, const unsigned char *b); 115 | #ifdef __cplusplus 116 | } 117 | #endif 118 | 119 | #endif 120 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/mdc2.h: -------------------------------------------------------------------------------- 1 | /* crypto/mdc2/mdc2.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MDC2_H 60 | # define HEADER_MDC2_H 61 | 62 | # include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | # ifdef OPENSSL_NO_MDC2 69 | # error MDC2 is disabled. 70 | # endif 71 | 72 | # define MDC2_BLOCK 8 73 | # define MDC2_DIGEST_LENGTH 16 74 | 75 | typedef struct mdc2_ctx_st { 76 | unsigned int num; 77 | unsigned char data[MDC2_BLOCK]; 78 | DES_cblock h, hh; 79 | int pad_type; /* either 1 or 2, default 1 */ 80 | } MDC2_CTX; 81 | 82 | # ifdef OPENSSL_FIPS 83 | int private_MDC2_Init(MDC2_CTX *c); 84 | # endif 85 | int MDC2_Init(MDC2_CTX *c); 86 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); 87 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); 88 | unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md); 89 | 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | 94 | #endif 95 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_OPENSSLV_H 2 | # define HEADER_OPENSSLV_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /*- 9 | * Numeric release version identifier: 10 | * MNNFFPPS: major minor fix patch status 11 | * The status nibble has one of the values 0 for development, 1 to e for betas 12 | * 1 to 14, and f for release. The patch level is exactly that. 13 | * For example: 14 | * 0.9.3-dev 0x00903000 15 | * 0.9.3-beta1 0x00903001 16 | * 0.9.3-beta2-dev 0x00903002 17 | * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) 18 | * 0.9.3 0x0090300f 19 | * 0.9.3a 0x0090301f 20 | * 0.9.4 0x0090400f 21 | * 1.2.3z 0x102031af 22 | * 23 | * For continuity reasons (because 0.9.5 is already out, and is coded 24 | * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level 25 | * part is slightly different, by setting the highest bit. This means 26 | * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start 27 | * with 0x0090600S... 28 | * 29 | * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) 30 | * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for 31 | * major minor fix final patch/beta) 32 | */ 33 | # define OPENSSL_VERSION_NUMBER 0x100020efL 34 | # ifdef OPENSSL_FIPS 35 | # define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n-fips 7 Dec 2017" 36 | # else 37 | # define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2n 7 Dec 2017" 38 | # endif 39 | # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT 40 | 41 | /*- 42 | * The macros below are to be used for shared library (.so, .dll, ...) 43 | * versioning. That kind of versioning works a bit differently between 44 | * operating systems. The most usual scheme is to set a major and a minor 45 | * number, and have the runtime loader check that the major number is equal 46 | * to what it was at application link time, while the minor number has to 47 | * be greater or equal to what it was at application link time. With this 48 | * scheme, the version number is usually part of the file name, like this: 49 | * 50 | * libcrypto.so.0.9 51 | * 52 | * Some unixen also make a softlink with the major verson number only: 53 | * 54 | * libcrypto.so.0 55 | * 56 | * On Tru64 and IRIX 6.x it works a little bit differently. There, the 57 | * shared library version is stored in the file, and is actually a series 58 | * of versions, separated by colons. The rightmost version present in the 59 | * library when linking an application is stored in the application to be 60 | * matched at run time. When the application is run, a check is done to 61 | * see if the library version stored in the application matches any of the 62 | * versions in the version string of the library itself. 63 | * This version string can be constructed in any way, depending on what 64 | * kind of matching is desired. However, to implement the same scheme as 65 | * the one used in the other unixen, all compatible versions, from lowest 66 | * to highest, should be part of the string. Consecutive builds would 67 | * give the following versions strings: 68 | * 69 | * 3.0 70 | * 3.0:3.1 71 | * 3.0:3.1:3.2 72 | * 4.0 73 | * 4.0:4.1 74 | * 75 | * Notice how version 4 is completely incompatible with version, and 76 | * therefore give the breach you can see. 77 | * 78 | * There may be other schemes as well that I haven't yet discovered. 79 | * 80 | * So, here's the way it works here: first of all, the library version 81 | * number doesn't need at all to match the overall OpenSSL version. 82 | * However, it's nice and more understandable if it actually does. 83 | * The current library version is stored in the macro SHLIB_VERSION_NUMBER, 84 | * which is just a piece of text in the format "M.m.e" (Major, minor, edit). 85 | * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, 86 | * we need to keep a history of version numbers, which is done in the 87 | * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and 88 | * should only keep the versions that are binary compatible with the current. 89 | */ 90 | # define SHLIB_VERSION_HISTORY "" 91 | # define SHLIB_VERSION_NUMBER "1.0.0" 92 | 93 | 94 | #ifdef __cplusplus 95 | } 96 | #endif 97 | #endif /* HEADER_OPENSSLV_H */ 98 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* ==================================================================== 2 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * 3. All advertising materials mentioning features or use of this 17 | * software must display the following acknowledgment: 18 | * "This product includes software developed by the OpenSSL Project 19 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 20 | * 21 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 22 | * endorse or promote products derived from this software without 23 | * prior written permission. For written permission, please contact 24 | * licensing@OpenSSL.org. 25 | * 26 | * 5. Products derived from this software may not be called "OpenSSL" 27 | * nor may "OpenSSL" appear in their names without prior written 28 | * permission of the OpenSSL Project. 29 | * 30 | * 6. Redistributions of any form whatsoever must retain the following 31 | * acknowledgment: 32 | * "This product includes software developed by the OpenSSL Project 33 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 34 | * 35 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 36 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 37 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 38 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 39 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 41 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 42 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 43 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 44 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 45 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 46 | * OF THE POSSIBILITY OF SUCH DAMAGE. 47 | * ==================================================================== 48 | * 49 | * This product includes cryptographic software written by Eric Young 50 | * (eay@cryptsoft.com). This product includes software written by Tim 51 | * Hudson (tjh@cryptsoft.com). 52 | * 53 | */ 54 | 55 | /* 56 | * This header only exists to break a circular dependency between pem and err 57 | * Ben 30 Jan 1999. 58 | */ 59 | 60 | #ifdef __cplusplus 61 | extern "C" { 62 | #endif 63 | 64 | #ifndef HEADER_PEM_H 65 | void ERR_load_PEM_strings(void); 66 | #endif 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/pqueue.h: -------------------------------------------------------------------------------- 1 | /* crypto/pqueue/pqueue.h */ 2 | /* 3 | * DTLS implementation written by Nagendra Modadugu 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 5 | */ 6 | /* ==================================================================== 7 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. All advertising materials mentioning features or use of this 22 | * software must display the following acknowledgment: 23 | * "This product includes software developed by the OpenSSL Project 24 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 25 | * 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 | * endorse or promote products derived from this software without 28 | * prior written permission. For written permission, please contact 29 | * openssl-core@OpenSSL.org. 30 | * 31 | * 5. Products derived from this software may not be called "OpenSSL" 32 | * nor may "OpenSSL" appear in their names without prior written 33 | * permission of the OpenSSL Project. 34 | * 35 | * 6. Redistributions of any form whatsoever must retain the following 36 | * acknowledgment: 37 | * "This product includes software developed by the OpenSSL Project 38 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * ==================================================================== 53 | * 54 | * This product includes cryptographic software written by Eric Young 55 | * (eay@cryptsoft.com). This product includes software written by Tim 56 | * Hudson (tjh@cryptsoft.com). 57 | * 58 | */ 59 | 60 | #ifndef HEADER_PQUEUE_H 61 | # define HEADER_PQUEUE_H 62 | 63 | # include 64 | # include 65 | # include 66 | 67 | #ifdef __cplusplus 68 | extern "C" { 69 | #endif 70 | typedef struct _pqueue *pqueue; 71 | 72 | typedef struct _pitem { 73 | unsigned char priority[8]; /* 64-bit value in big-endian encoding */ 74 | void *data; 75 | struct _pitem *next; 76 | } pitem; 77 | 78 | typedef struct _pitem *piterator; 79 | 80 | pitem *pitem_new(unsigned char *prio64be, void *data); 81 | void pitem_free(pitem *item); 82 | 83 | pqueue pqueue_new(void); 84 | void pqueue_free(pqueue pq); 85 | 86 | pitem *pqueue_insert(pqueue pq, pitem *item); 87 | pitem *pqueue_peek(pqueue pq); 88 | pitem *pqueue_pop(pqueue pq); 89 | pitem *pqueue_find(pqueue pq, unsigned char *prio64be); 90 | pitem *pqueue_iterator(pqueue pq); 91 | pitem *pqueue_next(piterator *iter); 92 | 93 | void pqueue_print(pqueue pq); 94 | int pqueue_size(pqueue pq); 95 | 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | #endif /* ! HEADER_PQUEUE_H */ 100 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | /* crypto/rc2/rc2.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC2_H 60 | # define HEADER_RC2_H 61 | 62 | # include /* OPENSSL_NO_RC2, RC2_INT */ 63 | # ifdef OPENSSL_NO_RC2 64 | # error RC2 is disabled. 65 | # endif 66 | 67 | # define RC2_ENCRYPT 1 68 | # define RC2_DECRYPT 0 69 | 70 | # define RC2_BLOCK 8 71 | # define RC2_KEY_LENGTH 16 72 | 73 | #ifdef __cplusplus 74 | extern "C" { 75 | #endif 76 | 77 | typedef struct rc2_key_st { 78 | RC2_INT data[64]; 79 | } RC2_KEY; 80 | 81 | # ifdef OPENSSL_FIPS 82 | void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, 83 | int bits); 84 | # endif 85 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits); 86 | void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, 87 | RC2_KEY *key, int enc); 88 | void RC2_encrypt(unsigned long *data, RC2_KEY *key); 89 | void RC2_decrypt(unsigned long *data, RC2_KEY *key); 90 | void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 91 | RC2_KEY *ks, unsigned char *iv, int enc); 92 | void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, 93 | long length, RC2_KEY *schedule, unsigned char *ivec, 94 | int *num, int enc); 95 | void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, 96 | long length, RC2_KEY *schedule, unsigned char *ivec, 97 | int *num); 98 | 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif 104 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* crypto/rc4/rc4.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC4_H 60 | # define HEADER_RC4_H 61 | 62 | # include /* OPENSSL_NO_RC4, RC4_INT */ 63 | # ifdef OPENSSL_NO_RC4 64 | # error RC4 is disabled. 65 | # endif 66 | 67 | # include 68 | 69 | #ifdef __cplusplus 70 | extern "C" { 71 | #endif 72 | 73 | typedef struct rc4_key_st { 74 | RC4_INT x, y; 75 | RC4_INT data[256]; 76 | } RC4_KEY; 77 | 78 | const char *RC4_options(void); 79 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 80 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 81 | void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, 82 | unsigned char *outdata); 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* crypto/ripemd/ripemd.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RIPEMD_H 60 | # define HEADER_RIPEMD_H 61 | 62 | # include 63 | # include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | # ifdef OPENSSL_NO_RIPEMD 70 | # error RIPEMD is disabled. 71 | # endif 72 | 73 | # if defined(__LP32__) 74 | # define RIPEMD160_LONG unsigned long 75 | # elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 76 | # define RIPEMD160_LONG unsigned long 77 | # define RIPEMD160_LONG_LOG2 3 78 | # else 79 | # define RIPEMD160_LONG unsigned int 80 | # endif 81 | 82 | # define RIPEMD160_CBLOCK 64 83 | # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 84 | # define RIPEMD160_DIGEST_LENGTH 20 85 | 86 | typedef struct RIPEMD160state_st { 87 | RIPEMD160_LONG A, B, C, D, E; 88 | RIPEMD160_LONG Nl, Nh; 89 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 90 | unsigned int num; 91 | } RIPEMD160_CTX; 92 | 93 | # ifdef OPENSSL_FIPS 94 | int private_RIPEMD160_Init(RIPEMD160_CTX *c); 95 | # endif 96 | int RIPEMD160_Init(RIPEMD160_CTX *c); 97 | int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 98 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 99 | unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md); 100 | void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/ssl23.h: -------------------------------------------------------------------------------- 1 | /* ssl/ssl23.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_SSL23_H 60 | # define HEADER_SSL23_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | /* 67 | * client 68 | */ 69 | /* write to server */ 70 | # define SSL23_ST_CW_CLNT_HELLO_A (0x210|SSL_ST_CONNECT) 71 | # define SSL23_ST_CW_CLNT_HELLO_B (0x211|SSL_ST_CONNECT) 72 | /* read from server */ 73 | # define SSL23_ST_CR_SRVR_HELLO_A (0x220|SSL_ST_CONNECT) 74 | # define SSL23_ST_CR_SRVR_HELLO_B (0x221|SSL_ST_CONNECT) 75 | 76 | /* server */ 77 | /* read from client */ 78 | # define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT) 79 | # define SSL23_ST_SR_CLNT_HELLO_B (0x211|SSL_ST_ACCEPT) 80 | 81 | #ifdef __cplusplus 82 | } 83 | #endif 84 | #endif 85 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/stack.h: -------------------------------------------------------------------------------- 1 | /* crypto/stack/stack.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_STACK_H 60 | # define HEADER_STACK_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | typedef struct stack_st { 67 | int num; 68 | char **data; 69 | int sorted; 70 | int num_alloc; 71 | int (*comp) (const void *, const void *); 72 | } _STACK; /* Use STACK_OF(...) instead */ 73 | 74 | # define M_sk_num(sk) ((sk) ? (sk)->num:-1) 75 | # define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) 76 | 77 | int sk_num(const _STACK *); 78 | void *sk_value(const _STACK *, int); 79 | 80 | void *sk_set(_STACK *, int, void *); 81 | 82 | _STACK *sk_new(int (*cmp) (const void *, const void *)); 83 | _STACK *sk_new_null(void); 84 | void sk_free(_STACK *); 85 | void sk_pop_free(_STACK *st, void (*func) (void *)); 86 | _STACK *sk_deep_copy(_STACK *, void *(*)(void *), void (*)(void *)); 87 | int sk_insert(_STACK *sk, void *data, int where); 88 | void *sk_delete(_STACK *st, int loc); 89 | void *sk_delete_ptr(_STACK *st, void *p); 90 | int sk_find(_STACK *st, void *data); 91 | int sk_find_ex(_STACK *st, void *data); 92 | int sk_push(_STACK *st, void *data); 93 | int sk_unshift(_STACK *st, void *data); 94 | void *sk_shift(_STACK *st); 95 | void *sk_pop(_STACK *st); 96 | void sk_zero(_STACK *st); 97 | int (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *))) 98 | (const void *, const void *); 99 | _STACK *sk_dup(_STACK *st); 100 | void sk_sort(_STACK *st); 101 | int sk_is_sorted(const _STACK *st); 102 | 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif 108 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | /* crypto/txt_db/txt_db.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_TXT_DB_H 60 | # define HEADER_TXT_DB_H 61 | 62 | # include 63 | # ifndef OPENSSL_NO_BIO 64 | # include 65 | # endif 66 | # include 67 | # include 68 | 69 | # define DB_ERROR_OK 0 70 | # define DB_ERROR_MALLOC 1 71 | # define DB_ERROR_INDEX_CLASH 2 72 | # define DB_ERROR_INDEX_OUT_OF_RANGE 3 73 | # define DB_ERROR_NO_INDEX 4 74 | # define DB_ERROR_INSERT_INDEX_CLASH 5 75 | 76 | #ifdef __cplusplus 77 | extern "C" { 78 | #endif 79 | 80 | typedef OPENSSL_STRING *OPENSSL_PSTRING; 81 | DECLARE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) 82 | 83 | typedef struct txt_db_st { 84 | int num_fields; 85 | STACK_OF(OPENSSL_PSTRING) *data; 86 | LHASH_OF(OPENSSL_STRING) **index; 87 | int (**qual) (OPENSSL_STRING *); 88 | long error; 89 | long arg1; 90 | long arg2; 91 | OPENSSL_STRING *arg_row; 92 | } TXT_DB; 93 | 94 | # ifndef OPENSSL_NO_BIO 95 | TXT_DB *TXT_DB_read(BIO *in, int num); 96 | long TXT_DB_write(BIO *out, TXT_DB *db); 97 | # else 98 | TXT_DB *TXT_DB_read(char *in, int num); 99 | long TXT_DB_write(char *out, TXT_DB *db); 100 | # endif 101 | int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), 102 | LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); 103 | void TXT_DB_free(TXT_DB *db); 104 | OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, 105 | OPENSSL_STRING *value); 106 | int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/ui_compat.h: -------------------------------------------------------------------------------- 1 | /* crypto/ui/ui.h */ 2 | /* 3 | * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project 4 | * 2001. 5 | */ 6 | /* ==================================================================== 7 | * Copyright (c) 2001 The OpenSSL Project. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. All advertising materials mentioning features or use of this 22 | * software must display the following acknowledgment: 23 | * "This product includes software developed by the OpenSSL Project 24 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 25 | * 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 | * endorse or promote products derived from this software without 28 | * prior written permission. For written permission, please contact 29 | * openssl-core@openssl.org. 30 | * 31 | * 5. Products derived from this software may not be called "OpenSSL" 32 | * nor may "OpenSSL" appear in their names without prior written 33 | * permission of the OpenSSL Project. 34 | * 35 | * 6. Redistributions of any form whatsoever must retain the following 36 | * acknowledgment: 37 | * "This product includes software developed by the OpenSSL Project 38 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * ==================================================================== 53 | * 54 | * This product includes cryptographic software written by Eric Young 55 | * (eay@cryptsoft.com). This product includes software written by Tim 56 | * Hudson (tjh@cryptsoft.com). 57 | * 58 | */ 59 | 60 | #ifndef HEADER_UI_COMPAT_H 61 | # define HEADER_UI_COMPAT_H 62 | 63 | # include 64 | # include 65 | 66 | #ifdef __cplusplus 67 | extern "C" { 68 | #endif 69 | 70 | /* 71 | * The following functions were previously part of the DES section, and are 72 | * provided here for backward compatibility reasons. 73 | */ 74 | 75 | # define des_read_pw_string(b,l,p,v) \ 76 | _ossl_old_des_read_pw_string((b),(l),(p),(v)) 77 | # define des_read_pw(b,bf,s,p,v) \ 78 | _ossl_old_des_read_pw((b),(bf),(s),(p),(v)) 79 | 80 | int _ossl_old_des_read_pw_string(char *buf, int length, const char *prompt, 81 | int verify); 82 | int _ossl_old_des_read_pw(char *buf, char *buff, int size, const char *prompt, 83 | int verify); 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | #endif 89 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/include-ios/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_WHRLPOOL_H 2 | # define HEADER_WHRLPOOL_H 3 | 4 | # include 5 | # include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | # define WHIRLPOOL_DIGEST_LENGTH (512/8) 12 | # define WHIRLPOOL_BBLOCK 512 13 | # define WHIRLPOOL_COUNTER (256/8) 14 | 15 | typedef struct { 16 | union { 17 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; 18 | /* double q is here to ensure 64-bit alignment */ 19 | double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)]; 20 | } H; 21 | unsigned char data[WHIRLPOOL_BBLOCK / 8]; 22 | unsigned int bitoff; 23 | size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; 24 | } WHIRLPOOL_CTX; 25 | 26 | # ifndef OPENSSL_NO_WHIRLPOOL 27 | # ifdef OPENSSL_FIPS 28 | int private_WHIRLPOOL_Init(WHIRLPOOL_CTX *c); 29 | # endif 30 | int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); 31 | int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes); 32 | void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits); 33 | int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); 34 | unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md); 35 | # endif 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/lib-ios/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caobo56/BCGenerator/2dd9228c9f0d9cb245c9825e9302aed63323c388/BCFunctionTest/Pods/OpenSSL-Universal/lib-ios/libcrypto.a -------------------------------------------------------------------------------- /BCFunctionTest/Pods/OpenSSL-Universal/lib-ios/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caobo56/BCGenerator/2dd9228c9f0d9cb245c9825e9302aed63323c388/BCFunctionTest/Pods/OpenSSL-Universal/lib-ios/libssl.a -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Target Support Files/CBBase58/CBBase58-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CBBase58 : NSObject 3 | @end 4 | @implementation PodsDummy_CBBase58 5 | @end 6 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Target Support Files/CBBase58/CBBase58-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Target Support Files/CBBase58/CBBase58.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CBBase58 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/CBBase58" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CBBase58" "${PODS_ROOT}/Headers/Public/OpenSSL-Universal" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/OpenSSL-Universal/lib-ios" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CBBase58 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Target Support Files/CBSecp256k1/CBSecp256k1-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CBSecp256k1 : NSObject 3 | @end 4 | @implementation PodsDummy_CBSecp256k1 5 | @end 6 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Target Support Files/CBSecp256k1/CBSecp256k1-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Target Support Files/CBSecp256k1/CBSecp256k1.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CBSecp256k1 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/CBSecp256k1/CBSecp256k1/secp256k1" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/CBSecp256k1" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CBSecp256k1" 5 | OTHER_LDFLAGS = -framework "secp256k1" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CBSecp256k1 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Target Support Files/Pods-BCFunctionTest/Pods-BCFunctionTest-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BCFunctionTest : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BCFunctionTest 5 | @end 6 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Target Support Files/Pods-BCFunctionTest/Pods-BCFunctionTest.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/CBSecp256k1/CBSecp256k1/secp256k1" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CBBase58" "${PODS_ROOT}/Headers/Public/CBSecp256k1" "${PODS_ROOT}/Headers/Public/OpenSSL-Universal" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CBBase58" "${PODS_CONFIGURATION_BUILD_DIR}/CBSecp256k1" "${PODS_ROOT}/OpenSSL-Universal/lib-ios" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/CBBase58" -isystem "${PODS_ROOT}/Headers/Public/CBSecp256k1" -isystem "${PODS_ROOT}/Headers/Public/OpenSSL-Universal" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"CBBase58" -l"CBSecp256k1" -l"crypto" -l"ssl" -framework "secp256k1" 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /BCFunctionTest/Pods/Target Support Files/Pods-BCFunctionTest/Pods-BCFunctionTest.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/CBSecp256k1/CBSecp256k1/secp256k1" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CBBase58" "${PODS_ROOT}/Headers/Public/CBSecp256k1" "${PODS_ROOT}/Headers/Public/OpenSSL-Universal" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CBBase58" "${PODS_CONFIGURATION_BUILD_DIR}/CBSecp256k1" "${PODS_ROOT}/OpenSSL-Universal/lib-ios" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/CBBase58" -isystem "${PODS_ROOT}/Headers/Public/CBSecp256k1" -isystem "${PODS_ROOT}/Headers/Public/OpenSSL-Universal" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"CBBase58" -l"CBSecp256k1" -l"crypto" -l"ssl" -framework "secp256k1" 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 曹博 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BCGenerator 2 | BCGenerator 一个比特币生成私钥,公钥,地址的pod库 3 | 4 | 简介:https://www.jianshu.com/p/7a259a46ecd9 5 | 6 | 相关实现原理: 7 | 8 | 技术细节:比特币私钥、公钥、钱包地址的来历和关系https://www.jianshu.com/p/bfa6a3207923 9 | 10 | ### BCGenerator项目集成方法: 11 | 可以直接使用pod集成,也可以将代码拖入项目中; 12 | pod 集成: 13 | ``` 14 | pod 'BCGenerator' 15 | ``` 16 | 17 | ### BCGenerator依赖类库: 18 | ``` 19 | s.dependency "CBSecp256k1" 20 | s.dependency "CBBase58" 21 | ``` 22 | CBSecp256k1 是从 iOS比特币项目CoreBitcoin 摘出来的椭圆双曲线算法部分。 23 | 24 | 项目地址:https://github.com/caobo56/CBSecp256k1 25 | 26 | CBBase58 是从 iOS比特币项目CoreBitcoin 摘出来的base58算法部分,并且集成了RIPEMD算法的 RIPEMD-160。 27 | 28 | 项目地址:https://github.com/caobo56/CBBase58 29 | 30 | 项目简介:https://www.jianshu.com/p/b20a26de4bc7 31 | 32 | ### BCGenerator目录 33 | 库文件目录如下: 34 | ``` 35 | BCGenerator.h EncryptUtil.h NSData+UTF8.h NSString+SHA.h 36 | BCGenerator.m EncryptUtil.m NSData+UTF8.m NSString+SHA.m 37 | ``` 38 | ### BCGenerator使用 39 | 其中BCGenerator 就是生成公钥私钥地址的对象,使用方法如下: 40 | ``` 41 | #import "BCGenerator.h" 42 | 43 | -(void)test{ 44 | BCGenerator * generator = [[BCGenerator alloc]initWithWith:@"pseudorandom sequence"]; 45 | NSLog(@"\n generator.rootPrivatekey = %@\n generator.mainProcessingKey = %@\n generator.rootPublickey = %@\n generator.address = %@",generator.rootPrivatekey,generator.mainProcessingKey,generator.rootPublickey,generator.address); 46 | } 47 | ``` 48 | ### BCGenerator的头文件 49 | ``` 50 | @property(strong,nonatomic)NSData * rootPrivatekey; 51 | //主私钥 52 | 53 | @property(strong,nonatomic)NSData * mainProcessingKey; 54 | //主链编码 55 | 56 | @property(strong,nonatomic)NSData * rootPublickey; 57 | //主公钥 58 | 59 | @property(strong,nonatomic)NSString * address; 60 | //由主公钥生成的比特币地址 61 | 62 | /** 63 | 根据伪随机数生成种子 64 | 65 | @param seedStr seedStr 根据伪随机数 66 | @return return instancetype 生成的对象 67 | */ 68 | -(instancetype)initWithWith:(NSString *)seedStr; 69 | 70 | ``` 71 | ### SHA 72 | SHA1-256 主要是由 EncryptUtil 来完成的。其他的sha算法在NSString+SHA中。 73 | 74 | 75 | # 版本更新 76 | -------------------------------------------------------------------------------------- 77 | ### 0.9.1发布 78 | 79 | pod 版本从 0.9.0 升级到 0.9.1 80 | 81 | 修复生成 BCGenerator 生成后 adddress 为 nil 的bug 82 | 83 | -------------------------------------------------------------------------------------- 84 | 85 | ### 0.9.2发布 86 | 87 | pod 版本从 0.9.1 升级到 0.9.2 88 | 89 | 添加 BTCScript 90 | 91 | 下面是本次添加的文件 92 | 93 | ``` 94 | BTC256.h 95 | BTC256.m 96 | BTCAddress.h 97 | BTCAddress.m 98 | BTCAddressSubclass.h 99 | BTCBigNumber.h 100 | BTCBigNumber.m 101 | BTCCurvePoint.h 102 | BTCCurvePoint.m 103 | BTCErrors.h 104 | BTCErrors.m 105 | BTCKey.h 106 | BTCKey.m 107 | BTCNetwork.h 108 | BTCNetwork.m 109 | BTCOpcode.h 110 | BTCOpcode.m 111 | BTCProtocolSerialization.h 112 | BTCProtocolSerialization.m 113 | BTCScript.h 114 | BTCScript.m 115 | BTCSignatureHashType.h 116 | 117 | ``` 118 | 119 | 使用方法: 120 | 121 | ``` 122 | BCGenerator * bb = [[BCGenerator alloc]initWithWith:@"caobor111111"]; 123 | BTCScript* outputScript = [[BTCScript alloc] initWithAddress:[BTCAddress addressWithString:bb.address]]; 124 | NSLog(@"outputScript.data == %@",outputScript.data); 125 | 126 | ``` 127 | 128 | -------------------------------------------------------------------------------------- 129 | ### 0.9.3发布 130 | 131 | pod 版本从 0.9.2 升级到 0.9.3 132 | 133 | 移除NSData+UTF8 (为解决同其他库的代码重复问题) 134 | 135 | -------------------------------------------------------------------------------------- 136 | --------------------------------------------------------------------------------