aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDataAdditions.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-08-19 21:13:28 +0000
committerrowanbeentje <rowan@beent.je>2012-08-19 21:13:28 +0000
commit0311db3d073af618f625b81c9bb5e7e06104ae5e (patch)
tree3e9efa48e2210c67a73efb8dfa3ed541079f6fa2 /Source/SPDataAdditions.m
parent62c8fd59519b2539a7ed031f5fa815a86efd85e1 (diff)
downloadsequelpro-0311db3d073af618f625b81c9bb5e7e06104ae5e.tar.gz
sequelpro-0311db3d073af618f625b81c9bb5e7e06104ae5e.tar.bz2
sequelpro-0311db3d073af618f625b81c9bb5e7e06104ae5e.zip
- Use a short hashed form of the connection path for SSH ControlPath settings, to aid length issues with the new sandbox-safe temporary folders being used
- Clean up SSH argument code
Diffstat (limited to 'Source/SPDataAdditions.m')
-rw-r--r--Source/SPDataAdditions.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/SPDataAdditions.m b/Source/SPDataAdditions.m
index c12f0781..ab0bfb01 100644
--- a/Source/SPDataAdditions.m
+++ b/Source/SPDataAdditions.m
@@ -199,6 +199,23 @@
/**
* Returns the hex representation of the given data.
*/
+- (NSString *)dataToHexString
+{
+ NSUInteger i;
+ const unsigned char *bytes = (const unsigned char *)[self bytes];
+ NSUInteger dataLength = [self length];
+ NSMutableString *hexString = [NSMutableString string];
+
+ for (i = 0; i < dataLength; i++) {
+ [hexString appendFormat:@"%02X", bytes[i]];
+ }
+
+ return hexString;
+}
+
+/**
+ * Returns the hex representation of the given data.
+ */
- (NSString *)dataToFormattedHexString
{
NSUInteger i, j;