Documentation of 'org.apache.derby.client.am.EncryptionManager' Java class
EncryptionManager
org.apache.derby.client.am

Class EncryptionManager



  • public class EncryptionManager
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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() 
      byte[] substitutePassword(java.lang.String userName, java.lang.String password, byte[] sourceSeed_, byte[] targetSeed_)
      Strong Password Substitution (USRSSBPWD).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SHA_1_DIGEST_ALGORITHM

        public static final java.lang.String SHA_1_DIGEST_ALGORITHM
        See Also:
        Constant Field Values
    • Method Detail

      • obtainPublicKey

        public byte[] obtainPublicKey()
      • encryptData

        public byte[] encryptData(byte[] plainText,
                                  int securityMechanism,
                                  byte[] initVector,
                                  byte[] targetPublicKey)
                           throws SqlException
        Throws:
        SqlException
      • decryptData

        public byte[] decryptData(byte[] cipherText,
                                  int securityMechanism,
                                  byte[] initVector,
                                  byte[] targetPublicKey)
                           throws SqlException
        Throws:
        SqlException
      • resetSecurityKeys

        public void resetSecurityKeys()
      • generateSeed

        public byte[] generateSeed()
        This method generates an 8-Byte random seed for the client (source).
        Returns:
        a random 8-Byte seed.
      • substitutePassword

        public byte[] substitutePassword(java.lang.String userName,
                                         java.lang.String password,
                                         byte[] sourceSeed_,
                                         byte[] targetSeed_)
                                  throws SqlException
        Strong Password Substitution (USRSSBPWD). This method generates a password substitute to send to the target server. Substitution algorithm works as follow: PW_TOKEN = SHA-1(PW, ID) The password (PW) and user name (ID) can be of any length greater than or equal to 1 byte. The client generates a 20-byte password substitute (PW_SUB) as follows: PW_SUB = SHA-1(PW_TOKEN, RDr, RDs, ID, PWSEQs) w/ (RDs) as the random client seed and (RDr) as the server one. See PWDSSB - Strong Password Substitution Security Mechanism (DRDA Vol.3 - P.650)
        Parameters:
        userName - The user's name
        password - The user's password
        sourceSeed_ - random client seed (RDs)
        targetSeed_ - random server seed (RDr)
        Returns:
        a password substitute.
        Throws:
        SqlException

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.