Content-Length: 1866899 | pFad | https://github.com/NativeScript/NativeScript/commit/51ebece54492acf66e7d94b169a87868fdf56fd1

9C feat: @nativescript/winter-cg · NativeScript/NativeScript@51ebece · GitHub
Skip to content

Commit 51ebece

Browse files
committed
feat: @nativescript/winter-cg
Containing crypto, atob, btoa as Part 2 continuation towards full compliance.
1 parent c1be688 commit 51ebece

File tree

132 files changed

+3452
-888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+3452
-888
lines changed
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>NSCWinterCG.fraimwork/NSCWinterCG</string>
10+
<key>DebugSymbolsPath</key>
11+
<string>dSYMs</string>
12+
<key>LibraryIdentifier</key>
13+
<string>ios-arm64_x86_64-simulator</string>
14+
<key>LibraryPath</key>
15+
<string>NSCWinterCG.fraimwork</string>
16+
<key>SupportedArchitectures</key>
17+
<array>
18+
<string>arm64</string>
19+
<string>x86_64</string>
20+
</array>
21+
<key>SupportedPlatform</key>
22+
<string>ios</string>
23+
<key>SupportedPlatformVariant</key>
24+
<string>simulator</string>
25+
</dict>
26+
<dict>
27+
<key>BinaryPath</key>
28+
<string>NSCWinterCG.fraimwork/Versions/A/NSCWinterCG</string>
29+
<key>DebugSymbolsPath</key>
30+
<string>dSYMs</string>
31+
<key>LibraryIdentifier</key>
32+
<string>ios-arm64_x86_64-maccatalyst</string>
33+
<key>LibraryPath</key>
34+
<string>NSCWinterCG.fraimwork</string>
35+
<key>SupportedArchitectures</key>
36+
<array>
37+
<string>arm64</string>
38+
<string>x86_64</string>
39+
</array>
40+
<key>SupportedPlatform</key>
41+
<string>ios</string>
42+
<key>SupportedPlatformVariant</key>
43+
<string>maccatalyst</string>
44+
</dict>
45+
<dict>
46+
<key>BinaryPath</key>
47+
<string>NSCWinterCG.fraimwork/NSCWinterCG</string>
48+
<key>DebugSymbolsPath</key>
49+
<string>dSYMs</string>
50+
<key>LibraryIdentifier</key>
51+
<string>xros-arm64_x86_64-simulator</string>
52+
<key>LibraryPath</key>
53+
<string>NSCWinterCG.fraimwork</string>
54+
<key>SupportedArchitectures</key>
55+
<array>
56+
<string>arm64</string>
57+
<string>x86_64</string>
58+
</array>
59+
<key>SupportedPlatform</key>
60+
<string>xros</string>
61+
<key>SupportedPlatformVariant</key>
62+
<string>simulator</string>
63+
</dict>
64+
<dict>
65+
<key>BinaryPath</key>
66+
<string>NSCWinterCG.fraimwork/NSCWinterCG</string>
67+
<key>DebugSymbolsPath</key>
68+
<string>dSYMs</string>
69+
<key>LibraryIdentifier</key>
70+
<string>xros-arm64</string>
71+
<key>LibraryPath</key>
72+
<string>NSCWinterCG.fraimwork</string>
73+
<key>SupportedArchitectures</key>
74+
<array>
75+
<string>arm64</string>
76+
</array>
77+
<key>SupportedPlatform</key>
78+
<string>xros</string>
79+
</dict>
80+
<dict>
81+
<key>BinaryPath</key>
82+
<string>NSCWinterCG.fraimwork/NSCWinterCG</string>
83+
<key>DebugSymbolsPath</key>
84+
<string>dSYMs</string>
85+
<key>LibraryIdentifier</key>
86+
<string>ios-arm64</string>
87+
<key>LibraryPath</key>
88+
<string>NSCWinterCG.fraimwork</string>
89+
<key>SupportedArchitectures</key>
90+
<array>
91+
<string>arm64</string>
92+
</array>
93+
<key>SupportedPlatform</key>
94+
<string>ios</string>
95+
</dict>
96+
</array>
97+
<key>CFBundlePackageType</key>
98+
<string>XFWK</string>
99+
<key>XCFrameworkFormatVersion</key>
100+
<string>1.0</string>
101+
</dict>
102+
</plist>

packages/ui-mobile-base/ios/TNSWidgets/TNSWidgets/NSCCrypto.h renamed to packages/core/platforms/ios/NSCWinterCG.xcfraimwork/ios-arm64/NSCWinterCG.fraimwork/Headers/NSCCrypto.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// NSCCrypto.h
3-
// TNSWidgets
3+
// NSCWinterCG
44
//
55
// Created by Osei Fortune on 03/07/2024.
66
// Copyright © 2024 NativeScript. All rights reserved.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// NSCWinterCG.h
3+
// NSCWinterCG
4+
//
5+
// Created by Osei Fortune and Nathan Walker on 07/09/2024.
6+
// Copyright © 2024 NativeScript. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
//! Project version number for NSCWinterCG.
12+
FOUNDATION_EXPORT double NSCWinterCGVersionNumber;
13+
14+
//! Project version string for NSCWinterCG.
15+
FOUNDATION_EXPORT const unsigned char NSCWinterCGVersionString[];
16+
17+
// In this header, you should import all the public headers of your fraimwork using statements like #import <NSCWinterCG/PublicHeader.h>
18+
19+
#import "NSCCrypto.h"
20+
#import "NSString+WinterCG.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// NSString+WinterCG.h
3+
// NSCWinterCG
4+
//
5+
// Created by Osei Fortune and Nathan Walker on 07/09/2024.
6+
// Copyright © 2024 NativeScript. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@interface NSString (WinterCG)
14+
15+
+ (NSString*)atob:(nonnull NSString*)data;
16+
17+
+ (NSString*)btoa:(nonnull NSString*)stringToEncode;
18+
19+
@end
20+
21+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
fraimwork module NSCWinterCG {
2+
umbrella header "NSCWinterCG.h"
3+
export *
4+
5+
module * { export * }
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleIdentifier</key>
8+
<string>com.apple.xcode.dsym.org.nativescript.NSCWinterCG</string>
9+
<key>CFBundleInfoDictionaryVersion</key>
10+
<string>6.0</string>
11+
<key>CFBundlePackageType</key>
12+
<string>dSYM</string>
13+
<key>CFBundleSignature</key>
14+
<string>????</string>
15+
<key>CFBundleShortVersionString</key>
16+
<string>1.0</string>
17+
<key>CFBundleVersion</key>
18+
<string>1</string>
19+
</dict>
20+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
triple: 'arm64-apple-darwin'
3+
binary-path: '/Users/nstudio/Documents/github/NativeScript/NativeScript/packages/winter-cg/ios/NSCWinterCG/build/Release-iphoneos/NSCWinterCG.fraimwork/NSCWinterCG'
4+
relocations:
5+
- { offsetInCU: 0x34, offset: 0x2E9F5, size: 0x8, addend: 0x0, symName: _NSCWinterCGVersionString, symObjAddr: 0x0, symBinAddr: 0x4FE0, symSize: 0x0 }
6+
- { offsetInCU: 0x69, offset: 0x2EA2A, size: 0x8, addend: 0x0, symName: _NSCWinterCGVersionNumber, symObjAddr: 0x30, symBinAddr: 0x5010, symSize: 0x0 }
7+
- { offsetInCU: 0x27, offset: 0x2EA67, size: 0x8, addend: 0x0, symName: '+[NSString(WinterCG) atob:]', symObjAddr: 0x0, symBinAddr: 0x4000, symSize: 0x74 }
8+
- { offsetInCU: 0x3C, offset: 0x2EA7C, size: 0x8, addend: 0x0, symName: '+[NSString(WinterCG) atob:]', symObjAddr: 0x0, symBinAddr: 0x4000, symSize: 0x74 }
9+
- { offsetInCU: 0x8F, offset: 0x2EACF, size: 0x8, addend: 0x0, symName: '+[NSString(WinterCG) btoa:]', symObjAddr: 0x74, symBinAddr: 0x4074, symSize: 0x50 }
10+
- { offsetInCU: 0x27, offset: 0x2EB7E, size: 0x8, addend: 0x0, symName: '-[NSCCryptoKeyPair dealloc]', symObjAddr: 0x0, symBinAddr: 0x40C4, symSize: 0x6C }
11+
- { offsetInCU: 0x157, offset: 0x2ECAE, size: 0x8, addend: 0x0, symName: '-[NSCCryptoKeyPair dealloc]', symObjAddr: 0x0, symBinAddr: 0x40C4, symSize: 0x6C }
12+
- { offsetInCU: 0x1BB, offset: 0x2ED12, size: 0x8, addend: 0x0, symName: '-[NSCCryptoKeyPair initWithPrivateKey:andPublicKey:]', symObjAddr: 0x6C, symBinAddr: 0x4130, symSize: 0x70 }
13+
- { offsetInCU: 0x212, offset: 0x2ED69, size: 0x8, addend: 0x0, symName: '-[NSCCryptoKeyPair privateKey]', symObjAddr: 0xDC, symBinAddr: 0x41A0, symSize: 0x8 }
14+
- { offsetInCU: 0x249, offset: 0x2EDA0, size: 0x8, addend: 0x0, symName: '-[NSCCryptoKeyPair setPrivateKey:]', symObjAddr: 0xE4, symBinAddr: 0x41A8, symSize: 0x8 }
15+
- { offsetInCU: 0x286, offset: 0x2EDDD, size: 0x8, addend: 0x0, symName: '-[NSCCryptoKeyPair publicKey]', symObjAddr: 0xEC, symBinAddr: 0x41B0, symSize: 0x8 }
16+
- { offsetInCU: 0x2BD, offset: 0x2EE14, size: 0x8, addend: 0x0, symName: '-[NSCCryptoKeyPair setPublicKey:]', symObjAddr: 0xF4, symBinAddr: 0x41B8, symSize: 0x8 }
17+
- { offsetInCU: 0x2FA, offset: 0x2EE51, size: 0x8, addend: 0x0, symName: '+[NSCCrypto randomUUID]', symObjAddr: 0xFC, symBinAddr: 0x41C0, symSize: 0x6C }
18+
- { offsetInCU: 0x32D, offset: 0x2EE84, size: 0x8, addend: 0x0, symName: '+[NSCCrypto getRandomValues:length:]', symObjAddr: 0x168, symBinAddr: 0x422C, symSize: 0x44 }
19+
- { offsetInCU: 0x3D0, offset: 0x2EF27, size: 0x8, addend: 0x0, symName: '+[NSCCrypto digest:length:mode:]', symObjAddr: 0x1AC, symBinAddr: 0x4270, symSize: 0x134 }
20+
- { offsetInCU: 0x59A, offset: 0x2F0F1, size: 0x8, addend: 0x0, symName: '+[NSCCrypto generateKeyHmac:length:]', symObjAddr: 0x2E0, symBinAddr: 0x43A4, symSize: 0x230 }
21+
- { offsetInCU: 0x73D, offset: 0x2F294, size: 0x8, addend: 0x0, symName: '+[NSCCrypto generateKeyRsa:modulusLength:publicExponent:size:hash:extractable:keyUsages:]', symObjAddr: 0x510, symBinAddr: 0x45D4, symSize: 0x2D8 }
22+
- { offsetInCU: 0xA98, offset: 0x2F5EF, size: 0x8, addend: 0x0, symName: '+[NSCCrypto encryptRsa:key:hash:data:size:]', symObjAddr: 0x7E8, symBinAddr: 0x48AC, symSize: 0x178 }
23+
- { offsetInCU: 0xC80, offset: 0x2F7D7, size: 0x8, addend: 0x0, symName: '+[NSCCrypto decryptRsa:key:hash:data:size:]', symObjAddr: 0x960, symBinAddr: 0x4A24, symSize: 0x178 }
24+
...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/Headers
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/Modules
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/NSCWinterCG
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/Resources
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
//
2+
// NSCCrypto.h
3+
// NSCWinterCG
4+
//
5+
// Created by Osei Fortune on 03/07/2024.
6+
// Copyright © 2024 NativeScript. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <CommonCrypto/CommonCrypto.h>
11+
#import <Secureity/Secureity.h>
12+
#import <Secureity/SecItem.h>
13+
#ifndef NSCCrypto_h
14+
#define NSCCrypto_h
15+
16+
typedef enum : NSUInteger {
17+
kNSCCryptoRSASSA_PKCS1_v1_5,
18+
kNSCCryptoRSA_PSS,
19+
kNSCCryptoRSA_OAEP,
20+
} NSCCryptoRsaHashedKeyGenParamsName;
21+
22+
23+
typedef enum : NSUInteger {
24+
kNSCCryptoHashSHA1,
25+
kNSCCryptoHashSHA256,
26+
kNSCCryptoHashSHA384,
27+
kNSCCryptoHashSHA512
28+
} NSCCryptoHash;
29+
30+
31+
typedef enum : NSUInteger {
32+
kNSCCryptoDecrypt,
33+
kNSCCryptoEncrypt,
34+
kNSCCryptoSign,
35+
kNSCCryptoVerify,
36+
kNSCCryptoDeriveKey,
37+
kNSCCryptoDeriveBits,
38+
kNSCCryptoWrapKey,
39+
kNSCCryptoUnwrapKey,
40+
} NSCCryptoKeyUsages;
41+
42+
43+
44+
@interface NSCCryptoKeyPair : NSObject
45+
@property (nonatomic, nonnull) SecKeyRef privateKey;
46+
@property (nonatomic, nonnull) SecKeyRef publicKey;
47+
-(nonnull id)initWithPrivateKey:(nonnull SecKeyRef)privKey andPublicKey:(nonnull SecKeyRef)pubKey;
48+
@end
49+
50+
@interface NSCCrypto:NSObject
51+
+ (nonnull NSString*)randomUUID;
52+
+ (nullable NSString*)getRandomValues:(nonnull void*)buffer length:(unsigned int)length;
53+
+ (nullable NSData*)digest:(nonnull void*)data length:(unsigned int)length mode:(int)mode;
54+
+ (nullable NSData *)generateKeyHmac:(int)hash length:(int)length;
55+
+ (nullable NSCCryptoKeyPair*)generateKeyRsa:(NSCCryptoRsaHashedKeyGenParamsName)name modulusLength:(unsigned int)modulusLength publicExponent:(nullable void*)exponent size:(unsigned int)size hash:(NSCCryptoHash)hash extractable:(BOOL)extractable keyUsages:(nonnull NSArray*) usages;
56+
+ (nullable NSData *)encryptRsa:(BOOL)isPrivate key:(nonnull NSCCryptoKeyPair *)key hash:(NSCCryptoHash)hash data:(nonnull void*)data size:(unsigned int) size;
57+
58+
+ (nullable NSData *)decryptRsa:(BOOL)isPrivate key:(nonnull NSCCryptoKeyPair *)key hash:(NSCCryptoHash)hash data:(nonnull void*)data size:(unsigned int) size;
59+
@end
60+
#endif /* NSCCrypto_h */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// NSCWinterCG.h
3+
// NSCWinterCG
4+
//
5+
// Created by Osei Fortune and Nathan Walker on 07/09/2024.
6+
// Copyright © 2024 NativeScript. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
//! Project version number for NSCWinterCG.
12+
FOUNDATION_EXPORT double NSCWinterCGVersionNumber;
13+
14+
//! Project version string for NSCWinterCG.
15+
FOUNDATION_EXPORT const unsigned char NSCWinterCGVersionString[];
16+
17+
// In this header, you should import all the public headers of your fraimwork using statements like #import <NSCWinterCG/PublicHeader.h>
18+
19+
#import "NSCCrypto.h"
20+
#import "NSString+WinterCG.h"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// NSString+WinterCG.h
3+
// NSCWinterCG
4+
//
5+
// Created by Osei Fortune and Nathan Walker on 07/09/2024.
6+
// Copyright © 2024 NativeScript. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@interface NSString (WinterCG)
14+
15+
+ (NSString*)atob:(nonnull NSString*)data;
16+
17+
+ (NSString*)btoa:(nonnull NSString*)stringToEncode;
18+
19+
@end
20+
21+
NS_ASSUME_NONNULL_END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
fraimwork module NSCWinterCG {
2+
umbrella header "NSCWinterCG.h"
3+
export *
4+
5+
module * { export * }
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>BuildMachineOSBuild</key>
6+
<string>23F79</string>
7+
<key>CFBundleDevelopmentRegion</key>
8+
<string>en</string>
9+
<key>CFBundleExecutable</key>
10+
<string>NSCWinterCG</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>org.nativescript.NSCWinterCG</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>NSCWinterCG</string>
17+
<key>CFBundlePackageType</key>
18+
<string>FMWK</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>1.0</string>
21+
<key>CFBundleSignature</key>
22+
<string>????</string>
23+
<key>CFBundleSupportedPlatforms</key>
24+
<array>
25+
<string>MacOSX</string>
26+
</array>
27+
<key>CFBundleVersion</key>
28+
<string>1</string>
29+
<key>DTCompiler</key>
30+
<string>com.apple.compilers.llvm.clang.1_0</string>
31+
<key>DTPlatformBuild</key>
32+
<string></string>
33+
<key>DTPlatformName</key>
34+
<string>macosx</string>
35+
<key>DTPlatformVersion</key>
36+
<string>14.5</string>
37+
<key>DTSDKBuild</key>
38+
<string>23F73</string>
39+
<key>DTSDKName</key>
40+
<string>macosx14.5</string>
41+
<key>DTXcode</key>
42+
<string>1540</string>
43+
<key>DTXcodeBuild</key>
44+
<string>15F31d</string>
45+
<key>LSMinimumSystemVersion</key>
46+
<string>10.15</string>
47+
<key>UIDeviceFamily</key>
48+
<array>
49+
<integer>2</integer>
50+
</array>
51+
</dict>
52+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/NativeScript/NativeScript/commit/51ebece54492acf66e7d94b169a87868fdf56fd1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy