mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-04 13:15:06 +00:00
feat(core): Added AES-128-CBC password scheme for SQL authentication.
This allows SOGo to use Plesk's database as an authentication source.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* NSData+Crypto.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2012 Nicolas Höft
|
||||
* Copyright (C) 2012-2016 Inverse inc.
|
||||
* Copyright (C) 2012-2020 Inverse inc.
|
||||
*
|
||||
* Author: Nicolas Höft
|
||||
* Inverse inc.
|
||||
@@ -32,7 +32,8 @@
|
||||
@interface NSData (SOGoCryptoExtension)
|
||||
|
||||
- (NSData *) asCryptedPassUsingScheme: (NSString *) passwordScheme
|
||||
withSalt: (NSData *) theSalt;
|
||||
withSalt: (NSData *) theSalt
|
||||
keyPath: (NSString *) theKeyPath;
|
||||
|
||||
- (NSData *) asLM;
|
||||
- (NSData *) asMD4;
|
||||
@@ -46,6 +47,8 @@
|
||||
- (NSData *) asSSHA512UsingSalt: (NSData *) theSalt;
|
||||
- (NSData *) asSHA256CryptUsingSalt: (NSData *) theSalt;
|
||||
- (NSData *) asSHA512CryptUsingSalt: (NSData *) theSalt;
|
||||
- (NSData *) asSymAES128CBCUsingIV: (NSString *) theIV
|
||||
keyPath: (NSString *) theKeyPath;
|
||||
- (NSData *) asCramMD5;
|
||||
|
||||
- (NSData *) asCryptUsingSalt: (NSData *) theSalt;
|
||||
@@ -57,8 +60,8 @@
|
||||
withBase64: (BOOL) doBase64;
|
||||
+ (NSData *) generateSaltForLength: (unsigned int) theLength;
|
||||
|
||||
+ (NSString *) encodeDataAsHexString: (NSData* ) theData;
|
||||
+ (NSData *) decodeDataFromHexString: (NSString* ) theString;
|
||||
+ (NSString *) encodeDataAsHexString: (NSData *) theData;
|
||||
+ (NSData *) decodeDataFromHexString: (NSString *) theString;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user