public interface PMPEncryptDecrypt
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] cipherText,
byte[] key)
Decrypts the given cipherText in byte array using the given key and return the decrypted text as byte array.
|
byte[] |
decrypt(byte[] cipherText,
java.lang.String key)
Decrypts the given cipherText in byte array using the given key and return the decrypted text as byte array.
|
byte[] |
decryptCertStream(java.io.InputStream inStream)
Decrypts the given InputStream content and return the decrypted content as byte array.
|
byte[] |
decryptCertStream(java.io.InputStream inStream,
java.lang.String key)
Decrypts the given InputStream content using given key and return the decrypted content as byte array.
|
java.io.ByteArrayInputStream |
decryptInputStream(java.io.InputStream inStream)
Decrypts the given InputStream content and return the decrypted content as ByteArrayInputStream.
|
java.io.ByteArrayInputStream |
decryptInputStream(java.io.InputStream inStream,
java.lang.String key)
Decrypts the given InputStream content using given key and return the decrypted content as ByteArrayInputStream.
|
java.lang.String |
decryptPassword(java.lang.String encryptedPassword)
Decrypts the given encrypted String and return the decrypted text as String.
|
java.lang.String |
decryptPassword(java.lang.String encryptedPassword,
java.lang.String key)
Decrypts the given encrypted String using the given key and return the decrypted text as String.
|
byte[] |
encrypt(byte[] plainText,
byte[] key)
Encrypts the given plain text in byte array using the given key and return the encrypted text as byte array.
|
byte[] |
encrypt(byte[] plainText,
java.lang.String key)
Encrypts the given plain text in byte array using the given key and return the encrypted text as byte array.
|
byte[] |
encrypt(java.lang.String plainText,
byte[] key)
Encrypts the given plain text String using the given key and return the encrypted text as byte array.
|
byte[] |
encrypt(java.lang.String plainText,
java.lang.String key)
Encrypts the given plain text String using the given key and return the encrypted text as byte array.
|
java.io.ByteArrayInputStream |
encryptCert(java.io.InputStream inStream)
Encrypts the given InputStream content and return the encrypted content as ByteArrayInputStream.
|
java.lang.String |
encryptPassword(java.lang.String password)
Encrypts the given password String and return the encrypted text as String.
|
java.lang.String |
encryptPassword(java.lang.String password,
java.lang.String key)
Encrypts the given password String using given key String and return the encrypted text as String.
|
java.lang.String |
generateCryptographicKey()
Generates a new 32 bit key.
|
java.lang.String |
getMSSQLMasterKey()
Returns the MSSql database master encryption key.
|
java.lang.String |
getPmp32BitKey()
Returns the 32 bit key which has been generated by generateCryptographicKey() recently.
|
void |
setPmp32BitKey(java.lang.String pmp32BitKey)
The 32 bit key which has been generated in the last call of generateCryptographicKey() can be set in a private static variable using this method and shall be returned when getPmp32BitKey() is called.
|
byte[] decrypt(byte[] cipherText,
byte[] key)
throws java.lang.Exception
cipherText - which has to be decrypted.key - The encryption key.java.lang.Exceptionbyte[] decrypt(byte[] cipherText,
java.lang.String key)
throws java.lang.Exception
cipherText - which to be decrypted is given as byte array.key - The encryption key as String.java.lang.Exceptionbyte[] decryptCertStream(java.io.InputStream inStream)
throws java.lang.Exception
inStream - the content which has to be decrypted is given as InputStream format.java.lang.Exceptionbyte[] decryptCertStream(java.io.InputStream inStream,
java.lang.String key)
throws java.lang.Exception
inStream - the content which has to be decrypted is given as InputStream format.key - The encryption key as String.java.lang.Exceptionjava.io.ByteArrayInputStream decryptInputStream(java.io.InputStream inStream)
throws java.lang.Exception
inStream - the content which has to be decrypted is given as InputStream format.java.lang.Exceptionjava.io.ByteArrayInputStream decryptInputStream(java.io.InputStream inStream,
java.lang.String key)
throws java.lang.Exception
inStream - the content which has to be decrypted is given as InputStream format.key - The encryption key as String.java.lang.Exceptionjava.lang.String decryptPassword(java.lang.String encryptedPassword)
throws java.lang.Exception
encryptedPassword - which has to be decrypted.java.lang.Exceptionjava.lang.String decryptPassword(java.lang.String encryptedPassword,
java.lang.String key)
throws java.lang.Exception
encryptedPassword - which has to be decrypted.key - the encryption key as String.java.lang.Exceptionbyte[] encrypt(byte[] plainText,
byte[] key)
throws java.lang.Exception
plainText - in byte array format which has to be encrypted.key - The encryption key in byte array format.java.lang.Exceptionbyte[] encrypt(byte[] plainText,
java.lang.String key)
throws java.lang.Exception
plainText - in byte array format which has to be encrypted.key - The encryption key as String.java.lang.Exceptionbyte[] encrypt(java.lang.String plainText,
byte[] key)
throws java.lang.Exception
plainText - to be encrypted.key - The encryption key in byte array format.java.lang.Exceptionbyte[] encrypt(java.lang.String plainText,
java.lang.String key)
throws java.lang.Exception
plainText - which has to be encrypted.key - The encryption key as String.java.lang.Exceptionjava.io.ByteArrayInputStream encryptCert(java.io.InputStream inStream)
throws java.lang.Exception
inStream - the certificate or file content which has to be encrypted is given as InputStream format.java.lang.Exceptionjava.lang.String encryptPassword(java.lang.String password)
throws java.lang.Exception
password - String which has to be encrypted.java.lang.Exceptionjava.lang.String encryptPassword(java.lang.String password,
java.lang.String key)
throws java.lang.Exception
password - String which has to be encrypted.key - The encryption key as String.java.lang.Exceptionjava.lang.String generateCryptographicKey()
throws java.lang.Exception
java.lang.Exceptionjava.lang.String getMSSQLMasterKey()
java.lang.Exceptionjava.lang.String getPmp32BitKey()
void setPmp32BitKey(java.lang.String pmp32BitKey)
pmp32BitKey - sets the given value to either any variable or can have your own logic to store the key in some file.