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.
|
default byte[] |
decrypt(byte[] cipherText,
javax.crypto.SecretKey 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)
Deprecated.
|
byte[] |
decryptCertStream(java.io.InputStream inStream)
Decrypts the given InputStream content and return the decrypted content as byte array.
|
default byte[] |
decryptCertStream(java.io.InputStream inStream,
javax.crypto.SecretKey key)
Decrypts the given InputStream content using given key and return the decrypted content as byte array.
|
byte[] |
decryptCertStream(java.io.InputStream inStream,
java.lang.String key)
Deprecated.
|
java.io.ByteArrayInputStream |
decryptInputStream(java.io.InputStream inStream)
Decrypts the given InputStream content and return the decrypted content as ByteArrayInputStream.
|
default java.io.ByteArrayInputStream |
decryptInputStream(java.io.InputStream inStream,
javax.crypto.SecretKey key)
Decrypts the given InputStream content using given key and return the decrypted content as ByteArrayInputStream.
|
java.io.ByteArrayInputStream |
decryptInputStream(java.io.InputStream inStream,
java.lang.String key)
Deprecated.
|
java.lang.String |
decryptPassword(java.lang.String encryptedPassword)
Decrypts the given encrypted String and return the decrypted text as String.
|
default java.lang.String |
decryptPassword(java.lang.String encryptedPassword,
javax.crypto.SecretKey key)
Decrypts the given encrypted String using the given key and return the decrypted text as String.
|
java.lang.String |
decryptPassword(java.lang.String encryptedPassword,
java.lang.String key)
Deprecated.
|
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.
|
default byte[] |
encrypt(byte[] plainText,
javax.crypto.SecretKey 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)
Deprecated.
|
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.
|
default byte[] |
encrypt(java.lang.String plainText,
javax.crypto.SecretKey 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)
Deprecated.
|
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.
|
default java.lang.String |
encryptPassword(java.lang.String password,
javax.crypto.SecretKey key)
Encrypts the given password String using given key String and return the encrypted text as String.
|
java.lang.String |
encryptPassword(java.lang.String password,
java.lang.String key)
Deprecated.
|
java.lang.String |
generateCryptographicKey()
Generates a new 32-bit key.
|
default java.lang.String |
getMSSQLMasterKey()
Returns the MSSql database master encryption key.
|
default java.lang.String |
getPmp32BitKey()
Returns the 32-bit key which has been generated by generateCryptographicKey() recently.
|
default 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.
|
default 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.default java.lang.String getPmp32BitKey()
java.lang.String generateCryptographicKey()
throws java.lang.Exception
java.lang.Exception - exception thrown when an error occurs while generating the key.default java.lang.String getMSSQLMasterKey()
@Deprecated
byte[] 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.Exception - exception thrown when an error occurs while encrypting the plain text.default byte[] encrypt(java.lang.String plainText,
javax.crypto.SecretKey key)
throws java.lang.Exception
plainText - which has to be encrypted.key - The encryption key as SecretKey.java.lang.Exception - exception thrown when an error occurs while encrypting the plain text.byte[] 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.Exception - exception thrown when an error occurs while encrypting the plain text.@Deprecated
byte[] 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.Exception - exception thrown when an error occurs while encrypting the plain text.default byte[] encrypt(byte[] plainText,
javax.crypto.SecretKey key)
throws java.lang.Exception
plainText - in byte array format which has to be encrypted.key - The encryption key as SecretKey.java.lang.Exception - exception thrown when an error occurs while encrypting the plain text.byte[] 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.Exception - exception thrown when an error occurs while encrypting the plain text.@Deprecated
byte[] 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.Exception - exception thrown when an error occurs while decrypting the cipher text.default byte[] decrypt(byte[] cipherText,
javax.crypto.SecretKey key)
throws java.lang.Exception
cipherText - which to be decrypted is given as byte array.key - The encryption key as SecretKey.java.lang.Exception - exception thrown when an error occurs while decrypting the cipher text.byte[] decrypt(byte[] cipherText,
byte[] key)
throws java.lang.Exception
cipherText - which has to be decrypted.key - The encryption key.java.lang.Exception - exception thrown when an error occurs while decrypting the cipher text.java.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.Exception - exception thrown when an error occurs while encrypting the certificate or file content.byte[] decryptCertStream(java.io.InputStream inStream)
throws java.lang.Exception
inStream - the content which has to be decrypted is given as InputStream format.java.lang.Exception - exception thrown when an error occurs while decrypting the InputStream content.@Deprecated
byte[] 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.Exception - exception thrown when an error occurs while decrypting the InputStream content.default byte[] decryptCertStream(java.io.InputStream inStream,
javax.crypto.SecretKey key)
throws java.lang.Exception
inStream - the content which has to be decrypted is given as InputStream format.key - The encryption key as SecretKey.java.lang.Exception - exception thrown when an error occurs while decrypting the InputStream content.java.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.Exception - exception thrown when an error occurs while decrypting the InputStream content.@Deprecated
java.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.Exception - exception thrown when an error occurs while decrypting the InputStream content.default java.io.ByteArrayInputStream decryptInputStream(java.io.InputStream inStream,
javax.crypto.SecretKey key)
throws java.lang.Exception
inStream - the content which has to be decrypted is given as InputStream format.key - The encryption key as SecretKey.java.lang.Exception - exception thrown when an error occurs while decrypting the InputStream content.@Deprecated
java.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.Exception - exception thrown when an error occurs while encrypting the password.default java.lang.String encryptPassword(java.lang.String password,
javax.crypto.SecretKey key)
throws java.lang.Exception
password - String which has to be encrypted.key - The encryption key as SecretKey.java.lang.Exception - exception thrown when an error occurs while encrypting the password.java.lang.String encryptPassword(java.lang.String password)
throws java.lang.Exception
password - String which has to be encrypted.java.lang.Exception - exception thrown when an error occurs while encrypting the password.java.lang.String decryptPassword(java.lang.String encryptedPassword)
throws java.lang.Exception
encryptedPassword - which has to be decrypted.java.lang.Exception - exception thrown when an error occurs while encrypting the password.@Deprecated
java.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.Exception - exception thrown when an error occurs while decrypting the password.default java.lang.String decryptPassword(java.lang.String encryptedPassword,
javax.crypto.SecretKey key)
throws java.lang.Exception
encryptedPassword - which has to be decrypted.key - the encryption key as SecretKey.java.lang.Exception - exception thrown when an error occurs while decrypting the password.Copyright © 2025 AdventNet Inc. All Rights Reserved.