We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent add13e9 commit f66e830Copy full SHA for f66e830
AppBox/Common/Common.m
@@ -12,9 +12,12 @@ @implementation Common
12
13
+ (NSString*)generateUUID {
14
NSMutableData *data = [NSMutableData dataWithLength:32];
15
+ int result = SecRandomCopyBytes(NULL, 32, data.mutableBytes);
16
+ NSAssert(result == 0, @"Error generating random bytes: %d", errno);
17
NSString *base64EncodedData = [data base64EncodedStringWithOptions:0];
18
base64EncodedData = [base64EncodedData stringByReplacingOccurrencesOfString:@"/" withString:@""];
19
return base64EncodedData;
20
+
21
}
22
23
#pragma mark - Notifications
0 commit comments