diff --git a/android/src/main/jniLibs/arm64-v8a/librsa_bridge.h b/android/src/main/jniLibs/arm64-v8a/librsa_bridge.h index 9bbafbc..ff18cc0 100644 --- a/android/src/main/jniLibs/arm64-v8a/librsa_bridge.h +++ b/android/src/main/jniLibs/arm64-v8a/librsa_bridge.h @@ -5,7 +5,7 @@ #line 1 "cgo-builtin-export-prolog" -#include /* for ptrdiff_t below */ +#include #ifndef GO_CGO_EXPORT_PROLOGUE_H #define GO_CGO_EXPORT_PROLOGUE_H @@ -46,11 +46,17 @@ typedef long long GoInt64; typedef unsigned long long GoUint64; typedef GoInt64 GoInt; typedef GoUint64 GoUint; -typedef __SIZE_TYPE__ GoUintptr; +typedef size_t GoUintptr; typedef float GoFloat32; typedef double GoFloat64; +#ifdef _MSC_VER +#include +typedef _Fcomplex GoComplex64; +typedef _Dcomplex GoComplex128; +#else typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; +#endif /* static assertion to make sure the file is being used on architecture diff --git a/android/src/main/jniLibs/arm64-v8a/librsa_bridge.so b/android/src/main/jniLibs/arm64-v8a/librsa_bridge.so index 0fea59b..6522723 100644 Binary files a/android/src/main/jniLibs/arm64-v8a/librsa_bridge.so and b/android/src/main/jniLibs/arm64-v8a/librsa_bridge.so differ diff --git a/android/src/main/jniLibs/armeabi-v7a/librsa_bridge.h b/android/src/main/jniLibs/armeabi-v7a/librsa_bridge.h index a5804e1..ca87c85 100644 --- a/android/src/main/jniLibs/armeabi-v7a/librsa_bridge.h +++ b/android/src/main/jniLibs/armeabi-v7a/librsa_bridge.h @@ -5,7 +5,7 @@ #line 1 "cgo-builtin-export-prolog" -#include /* for ptrdiff_t below */ +#include #ifndef GO_CGO_EXPORT_PROLOGUE_H #define GO_CGO_EXPORT_PROLOGUE_H @@ -46,11 +46,17 @@ typedef long long GoInt64; typedef unsigned long long GoUint64; typedef GoInt32 GoInt; typedef GoUint32 GoUint; -typedef __SIZE_TYPE__ GoUintptr; +typedef size_t GoUintptr; typedef float GoFloat32; typedef double GoFloat64; +#ifdef _MSC_VER +#include +typedef _Fcomplex GoComplex64; +typedef _Dcomplex GoComplex128; +#else typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; +#endif /* static assertion to make sure the file is being used on architecture diff --git a/android/src/main/jniLibs/armeabi-v7a/librsa_bridge.so b/android/src/main/jniLibs/armeabi-v7a/librsa_bridge.so index 6250aff..fe29deb 100644 Binary files a/android/src/main/jniLibs/armeabi-v7a/librsa_bridge.so and b/android/src/main/jniLibs/armeabi-v7a/librsa_bridge.so differ diff --git a/android/src/main/jniLibs/x86/librsa_bridge.h b/android/src/main/jniLibs/x86/librsa_bridge.h index a5804e1..ca87c85 100644 --- a/android/src/main/jniLibs/x86/librsa_bridge.h +++ b/android/src/main/jniLibs/x86/librsa_bridge.h @@ -5,7 +5,7 @@ #line 1 "cgo-builtin-export-prolog" -#include /* for ptrdiff_t below */ +#include #ifndef GO_CGO_EXPORT_PROLOGUE_H #define GO_CGO_EXPORT_PROLOGUE_H @@ -46,11 +46,17 @@ typedef long long GoInt64; typedef unsigned long long GoUint64; typedef GoInt32 GoInt; typedef GoUint32 GoUint; -typedef __SIZE_TYPE__ GoUintptr; +typedef size_t GoUintptr; typedef float GoFloat32; typedef double GoFloat64; +#ifdef _MSC_VER +#include +typedef _Fcomplex GoComplex64; +typedef _Dcomplex GoComplex128; +#else typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; +#endif /* static assertion to make sure the file is being used on architecture diff --git a/android/src/main/jniLibs/x86/librsa_bridge.so b/android/src/main/jniLibs/x86/librsa_bridge.so index 7bf3483..2d7d8d8 100644 Binary files a/android/src/main/jniLibs/x86/librsa_bridge.so and b/android/src/main/jniLibs/x86/librsa_bridge.so differ diff --git a/android/src/main/jniLibs/x86_64/librsa_bridge.h b/android/src/main/jniLibs/x86_64/librsa_bridge.h index 9bbafbc..ff18cc0 100644 --- a/android/src/main/jniLibs/x86_64/librsa_bridge.h +++ b/android/src/main/jniLibs/x86_64/librsa_bridge.h @@ -5,7 +5,7 @@ #line 1 "cgo-builtin-export-prolog" -#include /* for ptrdiff_t below */ +#include #ifndef GO_CGO_EXPORT_PROLOGUE_H #define GO_CGO_EXPORT_PROLOGUE_H @@ -46,11 +46,17 @@ typedef long long GoInt64; typedef unsigned long long GoUint64; typedef GoInt64 GoInt; typedef GoUint64 GoUint; -typedef __SIZE_TYPE__ GoUintptr; +typedef size_t GoUintptr; typedef float GoFloat32; typedef double GoFloat64; +#ifdef _MSC_VER +#include +typedef _Fcomplex GoComplex64; +typedef _Dcomplex GoComplex128; +#else typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; +#endif /* static assertion to make sure the file is being used on architecture diff --git a/android/src/main/jniLibs/x86_64/librsa_bridge.so b/android/src/main/jniLibs/x86_64/librsa_bridge.so index 0ca4675..7f1bc0f 100644 Binary files a/android/src/main/jniLibs/x86_64/librsa_bridge.so and b/android/src/main/jniLibs/x86_64/librsa_bridge.so differ diff --git a/ios/librsa_bridge.a b/ios/librsa_bridge.a index 3d6259c..3ad15d6 100644 Binary files a/ios/librsa_bridge.a and b/ios/librsa_bridge.a differ diff --git a/package.json b/package.json index e101604..66ba239 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-fast-rsa", - "version": "2.3.2", + "version": "2.3.3", "description": "library for use RSA", "main": "lib/commonjs/index", "module": "lib/module/index", diff --git a/src/bridge.ts b/src/bridge.ts index 9f7364a..8ebf9be 100644 --- a/src/bridge.ts +++ b/src/bridge.ts @@ -1,7 +1,7 @@ export { Hash } from './model/hash'; export { KeyPair } from './model/key-pair'; -export { PEMCipher } from './model/pemcipher'; -export { PKCS12KeyPair } from './model/pkcs12key-pair'; +export { PEMCipher } from './model/p-e-m-cipher'; +export { PKCS12KeyPair } from './model/p-k-c-s12-key-pair'; export { PrivateKeyInfo } from './model/private-key-info'; export { PublicKeyInfo } from './model/public-key-info'; export { SaltLength } from './model/salt-length'; diff --git a/src/index.tsx b/src/index.tsx index 3c9801c..be1a60e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -5,24 +5,24 @@ import { GenerateRequest } from './model/generate-request'; import { KeyPairResponse } from './model/key-pair-response'; import { StringResponse } from './model/string-response'; import { ConvertPrivateKeyRequest } from './model/convert-private-key-request'; -import { ConvertJWTRequest } from './model/convert-jwtrequest'; +import { ConvertJWTRequest } from './model/convert-j-w-t-request'; import { ConvertKeyPairRequest } from './model/convert-key-pair-request'; -import { ConvertPKCS12Request } from './model/convert-pkcs12request'; +import { ConvertPKCS12Request } from './model/convert-p-k-c-s12-request'; import { ConvertPublicKeyRequest } from './model/convert-public-key-request'; import { DecryptPrivateKeyRequest } from './model/decrypt-private-key-request'; import { EncryptPrivateKeyRequest } from './model/encrypt-private-key-request'; -import { DecryptOAEPRequest } from './model/decrypt-oaeprequest'; -import { DecryptPKCS1v15Request } from './model/decrypt-pkcs1v15request'; -import { EncryptOAEPRequest } from './model/encrypt-oaeprequest'; -import { EncryptPKCS1v15Request } from './model/encrypt-pkcs1v15request'; -import { SignPSSRequest } from './model/sign-pssrequest'; -import { SignPKCS1v15Request } from './model/sign-pkcs1v15request'; -import { VerifyPSSRequest } from './model/verify-pssrequest'; -import { VerifyPKCS1v15Request } from './model/verify-pkcs1v15request'; +import { DecryptOAEPRequest } from './model/decrypt-o-a-e-p-request'; +import { DecryptPKCS1v15Request } from './model/decrypt-p-k-c-s1v15-request'; +import { EncryptOAEPRequest } from './model/encrypt-o-a-e-p-request'; +import { EncryptPKCS1v15Request } from './model/encrypt-p-k-c-s1v15-request'; +import { SignPSSRequest } from './model/sign-p-s-s-request'; +import { SignPKCS1v15Request } from './model/sign-p-k-c-s1v15-request'; +import { VerifyPSSRequest } from './model/verify-p-s-s-request'; +import { VerifyPKCS1v15Request } from './model/verify-p-k-c-s1v15-request'; import { HashRequest } from './model/hash-request'; -import { Base64Request } from './model/base64request'; -import { PKCS12KeyPairResponse } from './model/pkcs12key-pair-response'; -import './shim' +import { Base64Request } from './model/base64-request'; +import { PKCS12KeyPairResponse } from './model/p-k-c-s12-key-pair-response'; +import './shim'; const FastRSANativeModules = (NativeModules as NativeModulesDef).FastRSA; diff --git a/src/model/base64request.ts b/src/model/base64-request.ts similarity index 100% rename from src/model/base64request.ts rename to src/model/base64-request.ts diff --git a/src/model/convert-jwtrequest.ts b/src/model/convert-j-w-t-request.ts similarity index 100% rename from src/model/convert-jwtrequest.ts rename to src/model/convert-j-w-t-request.ts diff --git a/src/model/convert-pkcs12request.ts b/src/model/convert-p-k-c-s12-request.ts similarity index 100% rename from src/model/convert-pkcs12request.ts rename to src/model/convert-p-k-c-s12-request.ts diff --git a/src/model/decrypt-oaepbytes-request.ts b/src/model/decrypt-o-a-e-p-bytes-request.ts similarity index 100% rename from src/model/decrypt-oaepbytes-request.ts rename to src/model/decrypt-o-a-e-p-bytes-request.ts diff --git a/src/model/decrypt-oaeprequest.ts b/src/model/decrypt-o-a-e-p-request.ts similarity index 100% rename from src/model/decrypt-oaeprequest.ts rename to src/model/decrypt-o-a-e-p-request.ts diff --git a/src/model/decrypt-pkcs1v15bytes-request.ts b/src/model/decrypt-p-k-c-s1v15-bytes-request.ts similarity index 100% rename from src/model/decrypt-pkcs1v15bytes-request.ts rename to src/model/decrypt-p-k-c-s1v15-bytes-request.ts diff --git a/src/model/decrypt-pkcs1v15request.ts b/src/model/decrypt-p-k-c-s1v15-request.ts similarity index 100% rename from src/model/decrypt-pkcs1v15request.ts rename to src/model/decrypt-p-k-c-s1v15-request.ts diff --git a/src/model/encrypt-oaepbytes-request.ts b/src/model/encrypt-o-a-e-p-bytes-request.ts similarity index 100% rename from src/model/encrypt-oaepbytes-request.ts rename to src/model/encrypt-o-a-e-p-bytes-request.ts diff --git a/src/model/encrypt-oaeprequest.ts b/src/model/encrypt-o-a-e-p-request.ts similarity index 100% rename from src/model/encrypt-oaeprequest.ts rename to src/model/encrypt-o-a-e-p-request.ts diff --git a/src/model/encrypt-pkcs1v15bytes-request.ts b/src/model/encrypt-p-k-c-s1v15-bytes-request.ts similarity index 100% rename from src/model/encrypt-pkcs1v15bytes-request.ts rename to src/model/encrypt-p-k-c-s1v15-bytes-request.ts diff --git a/src/model/encrypt-pkcs1v15request.ts b/src/model/encrypt-p-k-c-s1v15-request.ts similarity index 100% rename from src/model/encrypt-pkcs1v15request.ts rename to src/model/encrypt-p-k-c-s1v15-request.ts diff --git a/src/model/encrypt-private-key-request.ts b/src/model/encrypt-private-key-request.ts index 3b11b47..ae9193e 100644 --- a/src/model/encrypt-private-key-request.ts +++ b/src/model/encrypt-private-key-request.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { PEMCipher } from '../model/pemcipher'; +import { PEMCipher } from '../model/p-e-m-cipher'; export class EncryptPrivateKeyRequest { diff --git a/src/model/pemcipher.ts b/src/model/p-e-m-cipher.ts similarity index 100% rename from src/model/pemcipher.ts rename to src/model/p-e-m-cipher.ts diff --git a/src/model/pkcs12key-pair-response.ts b/src/model/p-k-c-s12-key-pair-response.ts similarity index 97% rename from src/model/pkcs12key-pair-response.ts rename to src/model/p-k-c-s12-key-pair-response.ts index b081397..d563476 100644 --- a/src/model/pkcs12key-pair-response.ts +++ b/src/model/p-k-c-s12-key-pair-response.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { PKCS12KeyPair } from '../model/pkcs12key-pair'; +import { PKCS12KeyPair } from '../model/p-k-c-s12-key-pair'; export class PKCS12KeyPairResponse { diff --git a/src/model/pkcs12key-pair.ts b/src/model/p-k-c-s12-key-pair.ts similarity index 100% rename from src/model/pkcs12key-pair.ts rename to src/model/p-k-c-s12-key-pair.ts diff --git a/src/model/sign-pkcs1v15bytes-request.ts b/src/model/sign-p-k-c-s1v15-bytes-request.ts similarity index 100% rename from src/model/sign-pkcs1v15bytes-request.ts rename to src/model/sign-p-k-c-s1v15-bytes-request.ts diff --git a/src/model/sign-pkcs1v15request.ts b/src/model/sign-p-k-c-s1v15-request.ts similarity index 100% rename from src/model/sign-pkcs1v15request.ts rename to src/model/sign-p-k-c-s1v15-request.ts diff --git a/src/model/sign-pssbytes-request.ts b/src/model/sign-p-s-s-bytes-request.ts similarity index 100% rename from src/model/sign-pssbytes-request.ts rename to src/model/sign-p-s-s-bytes-request.ts diff --git a/src/model/sign-pssrequest.ts b/src/model/sign-p-s-s-request.ts similarity index 100% rename from src/model/sign-pssrequest.ts rename to src/model/sign-p-s-s-request.ts diff --git a/src/model/verify-pkcs1v15bytes-request.ts b/src/model/verify-p-k-c-s1v15-bytes-request.ts similarity index 100% rename from src/model/verify-pkcs1v15bytes-request.ts rename to src/model/verify-p-k-c-s1v15-bytes-request.ts diff --git a/src/model/verify-pkcs1v15request.ts b/src/model/verify-p-k-c-s1v15-request.ts similarity index 100% rename from src/model/verify-pkcs1v15request.ts rename to src/model/verify-p-k-c-s1v15-request.ts diff --git a/src/model/verify-pssbytes-request.ts b/src/model/verify-p-s-s-bytes-request.ts similarity index 100% rename from src/model/verify-pssbytes-request.ts rename to src/model/verify-p-s-s-bytes-request.ts diff --git a/src/model/verify-pssrequest.ts b/src/model/verify-p-s-s-request.ts similarity index 100% rename from src/model/verify-pssrequest.ts rename to src/model/verify-p-s-s-request.ts