@onekeyfe/react-native-bundle-crypto 3.0.81-alpha.8 → 3.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nitrogen/generated/android/c++/JDirHashEntry.hpp +2 -2
- package/nitrogen/generated/android/c++/JHybridReactNativeBundleCryptoSpec.cpp +31 -29
- package/nitrogen/generated/android/c++/JHybridReactNativeBundleCryptoSpec.hpp +20 -22
- package/nitrogen/generated/android/c++/JSha256Result.hpp +2 -2
- package/nitrogen/generated/android/c++/JVerifyDetachedAscResult.hpp +2 -2
- package/nitrogen/generated/android/c++/JVerifyGpgCleartextResult.hpp +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/DirHashEntry.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/HybridReactNativeBundleCryptoSpec.kt +16 -19
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/Sha256Result.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/VerifyDetachedAscResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/VerifyGpgCleartextResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativebundlecrypto/reactnativebundlecryptoOnLoad.kt +1 -1
- package/nitrogen/generated/android/reactnativebundlecrypto+autolinking.cmake +1 -1
- package/nitrogen/generated/android/reactnativebundlecrypto+autolinking.gradle +1 -1
- package/nitrogen/generated/android/reactnativebundlecryptoOnLoad.cpp +27 -17
- package/nitrogen/generated/android/reactnativebundlecryptoOnLoad.hpp +14 -5
- package/nitrogen/generated/ios/ReactNativeBundleCrypto+autolinking.rb +2 -2
- package/nitrogen/generated/ios/ReactNativeBundleCrypto-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/ReactNativeBundleCrypto-Swift-Cxx-Bridge.hpp +2 -2
- package/nitrogen/generated/ios/ReactNativeBundleCrypto-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/ReactNativeBundleCryptoAutolinking.mm +1 -1
- package/nitrogen/generated/ios/ReactNativeBundleCryptoAutolinking.swift +9 -8
- package/nitrogen/generated/ios/c++/HybridReactNativeBundleCryptoSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridReactNativeBundleCryptoSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/swift/DirHashEntry.swift +5 -18
- package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_Sha256Result.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_VerifyDetachedAscResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_VerifyGpgCleartextResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_DirHashEntry_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +1 -2
- package/nitrogen/generated/ios/swift/HybridReactNativeBundleCryptoSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridReactNativeBundleCryptoSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/Sha256Result.swift +19 -44
- package/nitrogen/generated/ios/swift/VerifyDetachedAscResult.swift +21 -52
- package/nitrogen/generated/ios/swift/VerifyGpgCleartextResult.swift +21 -52
- package/nitrogen/generated/shared/c++/DirHashEntry.hpp +16 -8
- package/nitrogen/generated/shared/c++/HybridReactNativeBundleCryptoSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridReactNativeBundleCryptoSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/Sha256Result.hpp +16 -8
- package/nitrogen/generated/shared/c++/VerifyDetachedAscResult.hpp +19 -11
- package/nitrogen/generated/shared/c++/VerifyGpgCleartextResult.hpp +19 -11
- package/package.json +5 -6
|
@@ -2,19 +2,16 @@
|
|
|
2
2
|
/// ReactNativeBundleCryptoAutolinking.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
// TODO: Use empty enums once Swift supports exporting them as namespaces
|
|
11
|
+
// See: https://github.com/swiftlang/swift/pull/83616
|
|
8
12
|
public final class ReactNativeBundleCryptoAutolinking {
|
|
9
13
|
public typealias bridge = margelo.nitro.reactnativebundlecrypto.bridge.swift
|
|
10
14
|
|
|
11
|
-
/**
|
|
12
|
-
* Creates an instance of a Swift class that implements `HybridReactNativeBundleCryptoSpec`,
|
|
13
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridReactNativeBundleCryptoSpec_cxx`)
|
|
14
|
-
*
|
|
15
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
16
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `ReactNativeBundleCrypto`).
|
|
17
|
-
*/
|
|
18
15
|
public static func createReactNativeBundleCrypto() -> bridge.std__shared_ptr_HybridReactNativeBundleCryptoSpec_ {
|
|
19
16
|
let hybridObject = ReactNativeBundleCrypto()
|
|
20
17
|
return { () -> bridge.std__shared_ptr_HybridReactNativeBundleCryptoSpec_ in
|
|
@@ -22,4 +19,8 @@ public final class ReactNativeBundleCryptoAutolinking {
|
|
|
22
19
|
return __cxxWrapped.getCxxPart()
|
|
23
20
|
}()
|
|
24
21
|
}
|
|
22
|
+
|
|
23
|
+
public static func isReactNativeBundleCryptoRecyclable() -> Bool {
|
|
24
|
+
return ReactNativeBundleCrypto.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
25
26
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeBundleCryptoSpecSwift.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridReactNativeBundleCryptoSpecSwift.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeBundleCryptoSpecSwift.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -61,6 +61,12 @@ namespace margelo::nitro::reactnativebundlecrypto {
|
|
|
61
61
|
inline size_t getExternalMemorySize() noexcept override {
|
|
62
62
|
return _swiftPart.getMemorySize();
|
|
63
63
|
}
|
|
64
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
65
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridReactNativeBundleCryptoSpecSwift>(other)) {
|
|
66
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
64
70
|
void dispose() noexcept override {
|
|
65
71
|
_swiftPart.dispose();
|
|
66
72
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// DirHashEntry.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -23,25 +22,13 @@ public extension DirHashEntry {
|
|
|
23
22
|
self.init(std.string(relativePath), std.string(sha256))
|
|
24
23
|
}
|
|
25
24
|
|
|
25
|
+
@inline(__always)
|
|
26
26
|
var relativePath: String {
|
|
27
|
-
|
|
28
|
-
get {
|
|
29
|
-
return String(self.__relativePath)
|
|
30
|
-
}
|
|
31
|
-
@inline(__always)
|
|
32
|
-
set {
|
|
33
|
-
self.__relativePath = std.string(newValue)
|
|
34
|
-
}
|
|
27
|
+
return String(self.__relativePath)
|
|
35
28
|
}
|
|
36
29
|
|
|
30
|
+
@inline(__always)
|
|
37
31
|
var sha256: String {
|
|
38
|
-
|
|
39
|
-
get {
|
|
40
|
-
return String(self.__sha256)
|
|
41
|
-
}
|
|
42
|
-
@inline(__always)
|
|
43
|
-
set {
|
|
44
|
-
self.__sha256 = std.string(newValue)
|
|
45
|
-
}
|
|
32
|
+
return String(self.__sha256)
|
|
46
33
|
}
|
|
47
34
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_Sha256Result.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_VerifyDetachedAscResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_VerifyGpgCleartextResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_bool.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_std__exception_ptr.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_std__vector_DirHashEntry_.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_std__vector_std__string_.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// HybridReactNativeBundleCryptoSpec.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/// See ``HybridReactNativeBundleCryptoSpec``
|
|
@@ -39,14 +38,14 @@ open class HybridReactNativeBundleCryptoSpec_base {
|
|
|
39
38
|
public init() { }
|
|
40
39
|
public func getCxxWrapper() -> HybridReactNativeBundleCryptoSpec_cxx {
|
|
41
40
|
#if DEBUG
|
|
42
|
-
guard self is HybridReactNativeBundleCryptoSpec else {
|
|
41
|
+
guard self is any HybridReactNativeBundleCryptoSpec else {
|
|
43
42
|
fatalError("`self` is not a `HybridReactNativeBundleCryptoSpec`! Did you accidentally inherit from `HybridReactNativeBundleCryptoSpec_base` instead of `HybridReactNativeBundleCryptoSpec`?")
|
|
44
43
|
}
|
|
45
44
|
#endif
|
|
46
45
|
if let cxxWrapper = self.cxxWrapper {
|
|
47
46
|
return cxxWrapper
|
|
48
47
|
} else {
|
|
49
|
-
let cxxWrapper = HybridReactNativeBundleCryptoSpec_cxx(self as! HybridReactNativeBundleCryptoSpec)
|
|
48
|
+
let cxxWrapper = HybridReactNativeBundleCryptoSpec_cxx(self as! any HybridReactNativeBundleCryptoSpec)
|
|
50
49
|
self.cxxWrapper = cxxWrapper
|
|
51
50
|
return cxxWrapper
|
|
52
51
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// HybridReactNativeBundleCryptoSpec_cxx.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -96,6 +95,14 @@ open class HybridReactNativeBundleCryptoSpec_cxx {
|
|
|
96
95
|
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
96
|
}
|
|
98
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Compares this object with the given [other] object for reference equality.
|
|
100
|
+
*/
|
|
101
|
+
@inline(__always)
|
|
102
|
+
public func equals(other: HybridReactNativeBundleCryptoSpec_cxx) -> Bool {
|
|
103
|
+
return self.__implementation === other.__implementation
|
|
104
|
+
}
|
|
105
|
+
|
|
99
106
|
/**
|
|
100
107
|
* Call dispose() on the Swift class.
|
|
101
108
|
* This _may_ be called manually from JS.
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Sha256Result.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -35,51 +34,27 @@ public extension Sha256Result {
|
|
|
35
34
|
}())
|
|
36
35
|
}
|
|
37
36
|
|
|
37
|
+
@inline(__always)
|
|
38
38
|
var sha256: String? {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
}()
|
|
49
|
-
}
|
|
50
|
-
@inline(__always)
|
|
51
|
-
set {
|
|
52
|
-
self.__sha256 = { () -> bridge.std__optional_std__string_ in
|
|
53
|
-
if let __unwrappedValue = newValue {
|
|
54
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
55
|
-
} else {
|
|
56
|
-
return .init()
|
|
57
|
-
}
|
|
58
|
-
}()
|
|
59
|
-
}
|
|
39
|
+
return { () -> String? in
|
|
40
|
+
if bridge.has_value_std__optional_std__string_(self.__sha256) {
|
|
41
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__sha256)
|
|
42
|
+
return String(__unwrapped)
|
|
43
|
+
} else {
|
|
44
|
+
return nil
|
|
45
|
+
}
|
|
46
|
+
}()
|
|
60
47
|
}
|
|
61
48
|
|
|
49
|
+
@inline(__always)
|
|
62
50
|
var failureReason: String? {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
}()
|
|
73
|
-
}
|
|
74
|
-
@inline(__always)
|
|
75
|
-
set {
|
|
76
|
-
self.__failureReason = { () -> bridge.std__optional_std__string_ in
|
|
77
|
-
if let __unwrappedValue = newValue {
|
|
78
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
79
|
-
} else {
|
|
80
|
-
return .init()
|
|
81
|
-
}
|
|
82
|
-
}()
|
|
83
|
-
}
|
|
51
|
+
return { () -> String? in
|
|
52
|
+
if bridge.has_value_std__optional_std__string_(self.__failureReason) {
|
|
53
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__failureReason)
|
|
54
|
+
return String(__unwrapped)
|
|
55
|
+
} else {
|
|
56
|
+
return nil
|
|
57
|
+
}
|
|
58
|
+
}()
|
|
84
59
|
}
|
|
85
60
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// VerifyDetachedAscResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -35,62 +34,32 @@ public extension VerifyDetachedAscResult {
|
|
|
35
34
|
}())
|
|
36
35
|
}
|
|
37
36
|
|
|
37
|
+
@inline(__always)
|
|
38
38
|
var valid: Bool {
|
|
39
|
-
|
|
40
|
-
get {
|
|
41
|
-
return self.__valid
|
|
42
|
-
}
|
|
43
|
-
@inline(__always)
|
|
44
|
-
set {
|
|
45
|
-
self.__valid = newValue
|
|
46
|
-
}
|
|
39
|
+
return self.__valid
|
|
47
40
|
}
|
|
48
41
|
|
|
42
|
+
@inline(__always)
|
|
49
43
|
var sha256: String? {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
}()
|
|
60
|
-
}
|
|
61
|
-
@inline(__always)
|
|
62
|
-
set {
|
|
63
|
-
self.__sha256 = { () -> bridge.std__optional_std__string_ in
|
|
64
|
-
if let __unwrappedValue = newValue {
|
|
65
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
66
|
-
} else {
|
|
67
|
-
return .init()
|
|
68
|
-
}
|
|
69
|
-
}()
|
|
70
|
-
}
|
|
44
|
+
return { () -> String? in
|
|
45
|
+
if bridge.has_value_std__optional_std__string_(self.__sha256) {
|
|
46
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__sha256)
|
|
47
|
+
return String(__unwrapped)
|
|
48
|
+
} else {
|
|
49
|
+
return nil
|
|
50
|
+
}
|
|
51
|
+
}()
|
|
71
52
|
}
|
|
72
53
|
|
|
54
|
+
@inline(__always)
|
|
73
55
|
var reason: String? {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
}()
|
|
84
|
-
}
|
|
85
|
-
@inline(__always)
|
|
86
|
-
set {
|
|
87
|
-
self.__reason = { () -> bridge.std__optional_std__string_ in
|
|
88
|
-
if let __unwrappedValue = newValue {
|
|
89
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
90
|
-
} else {
|
|
91
|
-
return .init()
|
|
92
|
-
}
|
|
93
|
-
}()
|
|
94
|
-
}
|
|
56
|
+
return { () -> String? in
|
|
57
|
+
if bridge.has_value_std__optional_std__string_(self.__reason) {
|
|
58
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__reason)
|
|
59
|
+
return String(__unwrapped)
|
|
60
|
+
} else {
|
|
61
|
+
return nil
|
|
62
|
+
}
|
|
63
|
+
}()
|
|
95
64
|
}
|
|
96
65
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// VerifyGpgCleartextResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -35,62 +34,32 @@ public extension VerifyGpgCleartextResult {
|
|
|
35
34
|
}())
|
|
36
35
|
}
|
|
37
36
|
|
|
37
|
+
@inline(__always)
|
|
38
38
|
var valid: Bool {
|
|
39
|
-
|
|
40
|
-
get {
|
|
41
|
-
return self.__valid
|
|
42
|
-
}
|
|
43
|
-
@inline(__always)
|
|
44
|
-
set {
|
|
45
|
-
self.__valid = newValue
|
|
46
|
-
}
|
|
39
|
+
return self.__valid
|
|
47
40
|
}
|
|
48
41
|
|
|
42
|
+
@inline(__always)
|
|
49
43
|
var sha256: String? {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
}()
|
|
60
|
-
}
|
|
61
|
-
@inline(__always)
|
|
62
|
-
set {
|
|
63
|
-
self.__sha256 = { () -> bridge.std__optional_std__string_ in
|
|
64
|
-
if let __unwrappedValue = newValue {
|
|
65
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
66
|
-
} else {
|
|
67
|
-
return .init()
|
|
68
|
-
}
|
|
69
|
-
}()
|
|
70
|
-
}
|
|
44
|
+
return { () -> String? in
|
|
45
|
+
if bridge.has_value_std__optional_std__string_(self.__sha256) {
|
|
46
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__sha256)
|
|
47
|
+
return String(__unwrapped)
|
|
48
|
+
} else {
|
|
49
|
+
return nil
|
|
50
|
+
}
|
|
51
|
+
}()
|
|
71
52
|
}
|
|
72
53
|
|
|
54
|
+
@inline(__always)
|
|
73
55
|
var reason: String? {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
}()
|
|
84
|
-
}
|
|
85
|
-
@inline(__always)
|
|
86
|
-
set {
|
|
87
|
-
self.__reason = { () -> bridge.std__optional_std__string_ in
|
|
88
|
-
if let __unwrappedValue = newValue {
|
|
89
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
90
|
-
} else {
|
|
91
|
-
return .init()
|
|
92
|
-
}
|
|
93
|
-
}()
|
|
94
|
-
}
|
|
56
|
+
return { () -> String? in
|
|
57
|
+
if bridge.has_value_std__optional_std__string_(self.__reason) {
|
|
58
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__reason)
|
|
59
|
+
return String(__unwrapped)
|
|
60
|
+
} else {
|
|
61
|
+
return nil
|
|
62
|
+
}
|
|
63
|
+
}()
|
|
95
64
|
}
|
|
96
65
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// DirHashEntry.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::reactnativebundlecrypto {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (DirHashEntry).
|
|
34
39
|
*/
|
|
35
|
-
struct DirHashEntry {
|
|
40
|
+
struct DirHashEntry final {
|
|
36
41
|
public:
|
|
37
42
|
std::string relativePath SWIFT_PRIVATE;
|
|
38
43
|
std::string sha256 SWIFT_PRIVATE;
|
|
@@ -40,6 +45,9 @@ namespace margelo::nitro::reactnativebundlecrypto {
|
|
|
40
45
|
public:
|
|
41
46
|
DirHashEntry() = default;
|
|
42
47
|
explicit DirHashEntry(std::string relativePath, std::string sha256): relativePath(relativePath), sha256(sha256) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const DirHashEntry& lhs, const DirHashEntry& rhs) = default;
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
} // namespace margelo::nitro::reactnativebundlecrypto
|
|
@@ -52,14 +60,14 @@ namespace margelo::nitro {
|
|
|
52
60
|
static inline margelo::nitro::reactnativebundlecrypto::DirHashEntry fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
61
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
62
|
return margelo::nitro::reactnativebundlecrypto::DirHashEntry(
|
|
55
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "relativePath")),
|
|
56
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "sha256"))
|
|
63
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "relativePath"))),
|
|
64
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))
|
|
57
65
|
);
|
|
58
66
|
}
|
|
59
67
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativebundlecrypto::DirHashEntry& arg) {
|
|
60
68
|
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "relativePath", JSIConverter<std::string>::toJSI(runtime, arg.relativePath));
|
|
62
|
-
obj.setProperty(runtime, "sha256", JSIConverter<std::string>::toJSI(runtime, arg.sha256));
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "relativePath"), JSIConverter<std::string>::toJSI(runtime, arg.relativePath));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sha256"), JSIConverter<std::string>::toJSI(runtime, arg.sha256));
|
|
63
71
|
return obj;
|
|
64
72
|
}
|
|
65
73
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -70,8 +78,8 @@ namespace margelo::nitro {
|
|
|
70
78
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
79
|
return false;
|
|
72
80
|
}
|
|
73
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "relativePath"))) return false;
|
|
74
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "sha256"))) return false;
|
|
81
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "relativePath")))) return false;
|
|
82
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sha256")))) return false;
|
|
75
83
|
return true;
|
|
76
84
|
}
|
|
77
85
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridReactNativeBundleCryptoSpec.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridReactNativeBundleCryptoSpec.hpp"
|