Skip to content

Commit

Permalink
Add crypto module (#448)
Browse files Browse the repository at this point in the history
feat(crypto): add crypto module

Add crypto module that allows to configure SDK to encrypt and decrypt messages.

fix(crypto): fix legacy cryptor

Improved security of crypto implementation by adding enhanced AES-CBC cryptor.
  • Loading branch information
parfeon authored Oct 16, 2023
1 parent eef06ae commit 4bf909a
Show file tree
Hide file tree
Showing 320 changed files with 7,163 additions and 4,429 deletions.
19 changes: 14 additions & 5 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
---
name: objective-c
scm: github.com/pubnub/objective-c
version: "5.1.3"
version: "5.2.0"
schema: 1
changelog:
- date: 2023-10-16
version: v5.2.0
changes:
- type: feature
text: "Add a crypto module with a set of implemented cryptors."
- type: improvement
text: "Mark `uuid` as deprecated configuration property."
- type: improvement
text: "Fix warnings after project settings update."
- date: 2022-12-13
version: v5.1.3
changes:
Expand Down Expand Up @@ -1315,7 +1324,7 @@ sdks:
- distribution-type: source
distribution-repository: GitHub release
package-name: PubNub.framework
location: https://github.com/pubnub/objective-c/archive/refs/tags/v5.1.3.zip
location: https://github.com/pubnub/objective-c/archive/refs/tags/v5.2.0.zip
supported-platforms:
supported-operating-systems:
macOS:
Expand Down Expand Up @@ -1376,7 +1385,7 @@ sdks:
- distribution-type: library
distribution-repository: GitHub release
package-name: PubNub.ios.xcframework.tar.gz
location: https://github.com/pubnub/objective-c/releases/download/v5.1.3/PubNub.ios.xcframework.tar.gz
location: https://github.com/pubnub/objective-c/releases/download/v5.2.0/PubNub.ios.xcframework.tar.gz
supported-platforms:
supported-operating-systems:
iOS:
Expand All @@ -1395,7 +1404,7 @@ sdks:
- distribution-type: library
distribution-repository: GitHub release
package-name: PubNub.macos.framework.tar.gz
location: https://github.com/pubnub/objective-c/releases/download/v5.1.3/PubNub.macos.framework.tar.gz
location: https://github.com/pubnub/objective-c/releases/download/v5.2.0/PubNub.macos.framework.tar.gz
supported-platforms:
supported-operating-systems:
macOS:
Expand All @@ -1411,7 +1420,7 @@ sdks:
- distribution-type: library
distribution-repository: GitHub release
package-name: PubNub.tvos.xcframework.tar.gz
location: https://github.com/pubnub/objective-c/releases/download/v5.1.3/PubNub.tvos.xcframework.tar.gz
location: https://github.com/pubnub/objective-c/releases/download/v5.2.0/PubNub.tvos.xcframework.tar.gz
supported-platforms:
supported-operating-systems:
tvOS:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## v5.2.0
October 16 2023

#### Added
- Add a crypto module with a set of implemented cryptors.

#### Modified
- Mark `uuid` as deprecated configuration property.
- Fix warnings after project settings update.

## v5.1.3
December 13 2022

Expand Down
2 changes: 1 addition & 1 deletion Example/PubNub/PNAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
- (void)pubNubInit {

// Initialize PubNub client.
self.myConfig = [PNConfiguration configurationWithPublishKey:_pubKey subscribeKey:_subKey uuid:@"pubnub"];
self.myConfig = [PNConfiguration configurationWithPublishKey:_pubKey subscribeKey:_subKey userID:@"pubnub"];

[self updateClientConfiguration];
[self printClientConfiguration];
Expand Down
874 changes: 695 additions & 179 deletions Framework/PubNub Framework.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 3 additions & 3 deletions Framework/PubNub/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>PubNub</string>
<key>CFBundleGetInfoString</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>CFBundleIdentifier</key>
<string>com.pubnub.pubnub-objc</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2020 PubNub, Inc.</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 3 additions & 3 deletions Framework/PubNub/PubNub-iOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>PubNub</string>
<key>CFBundleGetInfoString</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>CFBundleIdentifier</key>
<string>com.pubnub.pubnub-objc</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2020 PubNub, Inc.</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 3 additions & 3 deletions Framework/PubNub/PubNub-tvOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>PubNub</string>
<key>CFBundleGetInfoString</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>CFBundleIdentifier</key>
<string>com.pubnub.pubnub-objc</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2020 PubNub, Inc.</string>
<key>NSPrincipalClass</key>
Expand Down
6 changes: 3 additions & 3 deletions Framework/PubNub/PubNub-watchOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>PubNub</string>
<key>CFBundleGetInfoString</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>CFBundleIdentifier</key>
<string>com.pubnub.pubnub-objc</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>5.1.3</string>
<string>5.2.0</string>
<key>NSHumanReadableCopyright</key>
<string>© 2010 - 2020 PubNub, Inc.</string>
<key>NSPrincipalClass</key>
Expand Down
128 changes: 74 additions & 54 deletions Framework/PubNub/PubNub.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,63 +15,83 @@ FOUNDATION_EXPORT const unsigned char PubNubVersionString[];


// Protocols
#import "PNEventsListener.h"
#import <PubNub/PNEventsListener.h>

// Categories
#import "NSURLSessionConfiguration+PNConfiguration.h"
#import <PubNub/NSURLSessionConfiguration+PNConfiguration.h>

// Data objects
#import "PNPresenceChannelGroupHereNowResult.h"
#import "PNChannelGroupClientStateResult.h"
#import "PNPresenceChannelHereNowResult.h"
#import "PNPresenceGlobalHereNowResult.h"
#import "PNFetchChannelsMetadataResult.h"
#import "PNChannelGroupChannelsResult.h"
#import "PNFetchMessageActionsResult.h"
#import "PNAPNSEnabledChannelsResult.h"
#import "PNSetChannelMetadataStatus.h"
#import "PNChannelClientStateResult.h"
#import "PNManageMembershipsStatus.h"
#import "PNClientStateUpdateStatus.h"
#import "PNFetchUUIDMetadataResult.h"
#import "PNPresenceWhereNowResult.h"
#import "PNAddMessageActionStatus.h"
#import "PNAcknowledgmentStatus.h"
#import "PNClientStateGetResult.h"
#import "PNChannelGroupsResult.h"
#import "PNMessageCountResult.h"
#import "PNClientInformation.h"
#import "PNSubscriberResults.h"
#import "PNSubscribeStatus.h"
#import "PNPublishStatus.h"
#import "PNHistoryResult.h"
#import "PNSignalStatus.h"
#import "PNServiceData.h"
#import "PNErrorStatus.h"
#import "PNTimeResult.h"
#import "PNKeychain.h"
#import "PNPAMToken.h"
#import "PNResult.h"
#import "PNStatus.h"
#import <PubNub/PNPresenceChannelGroupHereNowResult.h>
#import <PubNub/PNChannelGroupClientStateResult.h>
#import <PubNub/PNPresenceChannelHereNowResult.h>
#import <PubNub/PNPresenceGlobalHereNowResult.h>
#import <PubNub/PNFetchChannelsMetadataResult.h>
#import <PubNub/PNChannelGroupChannelsResult.h>
#import <PubNub/PNFetchMessageActionsResult.h>
#import <PubNub/PNAPNSEnabledChannelsResult.h>
#import <PubNub/PNSetChannelMetadataStatus.h>
#import <PubNub/PNChannelClientStateResult.h>
#import <PubNub/PNManageMembershipsStatus.h>
#import <PubNub/PNClientStateUpdateStatus.h>
#import <PubNub/PNFetchUUIDMetadataResult.h>
#import <PubNub/PNPresenceWhereNowResult.h>
#import <PubNub/PNAddMessageActionStatus.h>
#import <PubNub/PNAcknowledgmentStatus.h>
#import <PubNub/PNClientStateGetResult.h>
#import <PubNub/PNChannelGroupsResult.h>
#import <PubNub/PNMessageCountResult.h>
#import <PubNub/PNClientInformation.h>
#import <PubNub/PNSubscriberResults.h>
#import <PubNub/PNSubscribeStatus.h>
#import <PubNub/PNOperationResult.h>
#import <PubNub/PNPublishStatus.h>
#import <PubNub/PNHistoryResult.h>
#import <PubNub/PNSignalStatus.h>
#import <PubNub/PNServiceData.h>
#import <PubNub/PNErrorStatus.h>
#import <PubNub/PNTimeResult.h>
#import <PubNub/PNKeychain.h>
#import <PubNub/PNPAMToken.h>
#import <PubNub/PNResult.h>
#import <PubNub/PNStatus.h>

#pragma mark - Cryptor module

// Cryptor implementations
#import <PubNub/PNAESCBCCryptor.h>
#import <PubNub/PNLegacyCryptor.h>

// Protocols
#import <PubNub/PNCryptoProvider.h>
#import <PubNub/PNCryptor.h>

// Module
#import <PubNub/PNCryptorInputStream.h>
#import <PubNub/PNEncryptedStream.h>
#import <PubNub/PNEncryptedData.h>
#import <PubNub/PNCryptoModule.h>


#pragma mark - API

// API
#import "PubNub+Core.h"
#import "PubNub+MessageActions.h"
#import "PubNub+ChannelGroup.h"
#import "PubNub+Subscribe.h"
#import "PNConfiguration.h"
#import "PubNub+Presence.h"
#import "PubNub+Publish.h"
#import "PubNub+History.h"
#import "PubNub+Objects.h"
#import "PubNub+Files.h"
#import "PubNub+State.h"
#import "PNErrorCodes.h"
#import "PNStructures.h"
#import "PubNub+APNS.h"
#import "PubNub+Time.h"
#import "PubNub+PAM.h"
#import "PNLLogger.h"
#import "PNResult.h"
#import "PNStatus.h"
#import "PNAES.h"
#import <PubNub/PubNub+Core.h>
#import <PubNub/PubNub+MessageActions.h>
#import <PubNub/PubNub+ChannelGroup.h>
#import <PubNub/PNOperationResult.h>
#import <PubNub/PubNub+Subscribe.h>
#import <PubNub/PNConfiguration.h>
#import <PubNub/PubNub+Presence.h>
#import <PubNub/PubNub+Publish.h>
#import <PubNub/PubNub+History.h>
#import <PubNub/PubNub+Objects.h>
#import <PubNub/PubNub+Files.h>
#import <PubNub/PubNub+State.h>
#import <PubNub/PNErrorCodes.h>
#import <PubNub/PNStructures.h>
#import <PubNub/PubNub+APNS.h>
#import <PubNub/PubNub+Time.h>
#import <PubNub/PubNub+PAM.h>
#import <PubNub/PNLLogger.h>
#import <PubNub/PNStatus.h>
#import <PubNub/PNAES.h>
Loading

0 comments on commit 4bf909a

Please sign in to comment.