public class EncryptionManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SHA_1_DIGEST_ALGORITHM |
| Constructor and Description |
|---|
EncryptionManager(Agent agent) |
EncryptionManager(Agent agent,
String algorithm) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decryptData(byte[] cipherText,
int securityMechanism,
byte[] initVector,
byte[] targetPublicKey) |
byte[] |
encryptData(byte[] plainText,
int securityMechanism,
byte[] initVector,
byte[] targetPublicKey) |
byte[] |
generateSeed()
This method generates an 8-Byte random seed for the client (source).
|
byte[] |
obtainPublicKey() |
void |
resetSecurityKeys() |
void |
setInitVector(byte[] initVector) |
void |
setSecKey(byte[] secKey) |
byte[] |
substitutePassword(String userName,
String password,
byte[] sourceSeed_,
byte[] targetSeed_)
Strong Password Substitution (USRSSBPWD).
|
public static final String SHA_1_DIGEST_ALGORITHM
public EncryptionManager(Agent agent) throws SqlException
SqlExceptionpublic EncryptionManager(Agent agent, String algorithm) throws SqlException
SqlExceptionpublic byte[] obtainPublicKey()
public byte[] encryptData(byte[] plainText,
int securityMechanism,
byte[] initVector,
byte[] targetPublicKey)
throws SqlException
SqlExceptionpublic byte[] decryptData(byte[] cipherText,
int securityMechanism,
byte[] initVector,
byte[] targetPublicKey)
throws SqlException
SqlExceptionpublic void setInitVector(byte[] initVector)
public void setSecKey(byte[] secKey)
public void resetSecurityKeys()
public byte[] generateSeed()
public byte[] substitutePassword(String userName, String password, byte[] sourceSeed_, byte[] targetSeed_) throws SqlException
userName - The user's namepassword - The user's passwordsourceSeed_ - random client seed (RDs)targetSeed_ - random server seed (RDr)SqlExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.