public class SecPwd extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
encryptPwd(byte[] pwd,
byte[] rolename,
byte[] pwdkey)
This method builds the password key which consists 4 bytes of password id,
128 bytes of role name which would be 128 spaces when role name is null,
32 bytes of the digest message calculated using the session key on the data made up of
the procInfo and the encrypted data and 256 bytes (if the 2048 public key is used) or
128 bytes (if the1024 public key is used) encrypted data calculated using the public key
on the plain text made up of the session key, the nonce and the password.
|
byte[] |
getCertExpDate()
Gets the expiration date of the certificate
|
static SecPwd |
getInstance(Connection con,
String directory,
String fileName,
String serverName,
boolean spjMode,
byte[] procInfo) |
byte[] |
getProcInfo() |
int |
getPwdEBufferLen()
Gets length of buffer for password encryption (public)
or the length of the token if it is the SPJ mode
|
void |
openCertificate()
Processes the active certificate when spjMode is false
else does nothing.
|
static void |
removeInstance(Connection con) |
void |
switchCertificate(byte[] buf)
When autodownload is on, client will download the certificate from server
when there is no certificate or certificate is stale.
|
public static SecPwd getInstance(Connection con, String directory, String fileName, String serverName, boolean spjMode, byte[] procInfo) throws SecurityException
SecurityExceptionpublic static void removeInstance(Connection con)
public void openCertificate()
throws SecurityException
SecurityExceptionpublic void encryptPwd(byte[] pwd,
byte[] rolename,
byte[] pwdkey)
throws SecurityException
pwd - password to be encryptedrolename - role name to build password keyprocInfo - process information (PIN, CPU, segment name and time stamp)SecurityExceptionpublic int getPwdEBufferLen()
throws SecurityException
SecurityExceptionpublic byte[] getCertExpDate()
public void switchCertificate(byte[] buf)
throws SecurityException
buf - content of the certificate pushed from server.SecurityExceptionpublic byte[] getProcInfo()
Copyright © 2017. All Rights Reserved.