Uses of Class
org.owasp.esapi.errors.EncryptionException
-
Packages that use EncryptionException Package Description org.owasp.esapi The ESAPI interfaces andException
classes model the most important security functions to enterprise web applications.org.owasp.esapi.crypto This package contains ESAPI cryptography-related classes used throughout ESAPI.org.owasp.esapi.reference This package contains reference implementations of the ESAPI interfaces.org.owasp.esapi.reference.crypto This package contains the reference implementation for some of the ESAPI cryptography-related classes used throughout ESAPI. -
-
Uses of EncryptionException in org.owasp.esapi
Methods in org.owasp.esapi that throw EncryptionException Modifier and Type Method Description void
User. changePassword(java.lang.String oldPassword, java.lang.String newPassword1, java.lang.String newPassword2)
Sets the user's password, performing a verification of the user's old password, the equality of the two new passwords, and the strength of the new password.PlainText
Encryptor. decrypt(javax.crypto.SecretKey key, CipherText ciphertext)
Decrypts the providedCipherText
using the information from it and the specified secret key.PlainText
Encryptor. decrypt(CipherText ciphertext)
Decrypts the providedCipherText
using the information from it and the master encryption key as specified by the propertyEncryptor.MasterKey
as defined in theESAPI.properties
file.java.util.Map<java.lang.String,java.lang.String>
HTTPUtilities. decryptQueryString(java.lang.String encrypted)
Takes an encrypted querystring and returns a Map containing the original parameters.java.util.Map<java.lang.String,java.lang.String>
HTTPUtilities. decryptStateFromCookie()
Calls decryptStateFromCookie with the *current* request.java.util.Map<java.lang.String,java.lang.String>
HTTPUtilities. decryptStateFromCookie(javax.servlet.http.HttpServletRequest request)
Retrieves a map of data from a cookie encrypted with encryptStateInCookie().CipherText
Encryptor. encrypt(javax.crypto.SecretKey key, PlainText plaintext)
Encrypts the provided plaintext bytes using the cipher transformation specified by the propertyEncryptor.CipherTransformation
as defined in theESAPI.properties
file and the specified secret key.CipherText
Encryptor. encrypt(PlainText plaintext)
Encrypts the provided plaintext bytes using the cipher transformation specified by the propertyEncryptor.CipherTransformation
and the master encryption key as specified by the propertyEncryptor.MasterKey
as defined in theESAPI.properties
file.java.lang.String
HTTPUtilities. encryptHiddenField(java.lang.String value)
Encrypts a hidden field value for use in HTML.java.lang.String
HTTPUtilities. encryptQueryString(java.lang.String query)
Takes a querystring (everything after the question mark in the URL) and returns an encrypted string containing the parameters.void
HTTPUtilities. encryptStateInCookie(java.util.Map<java.lang.String,java.lang.String> cleartext)
Calls encryptStateInCookie with the *current* response.void
HTTPUtilities. encryptStateInCookie(javax.servlet.http.HttpServletResponse response, java.util.Map<java.lang.String,java.lang.String> cleartext)
Stores a Map of data in an encrypted cookie.java.lang.String
EncryptedProperties. getProperty(java.lang.String key)
Gets the property value from the encrypted store, decrypts it, and returns the plaintext value to the caller.java.lang.String
Randomizer. getRandomGUID()
Generates a random GUID.java.lang.String
Encryptor. hash(java.lang.String plaintext, java.lang.String salt)
Returns a string representation of the hash of the provided plaintext and salt.java.lang.String
Encryptor. hash(java.lang.String plaintext, java.lang.String salt, int iterations)
Returns a string representation of the hash of the provided plaintext and salt.java.lang.String
Authenticator. hashPassword(java.lang.String password, java.lang.String accountName)
Returns a string representation of the hashed password, using the accountName as the salt.java.lang.String
EncryptedProperties. setProperty(java.lang.String key, java.lang.String value)
Encrypts the plaintext property value and stores the ciphertext value in the encrypted store.java.lang.String
Encryptor. sign(java.lang.String data)
Create a digital signature for the provided data and return it in a string.java.lang.String
Encryptor. unseal(java.lang.String seal)
Unseals data (created with the seal method) and throws an exception describing any of the various problems that could exist with a seal, such as an invalid seal format, expired timestamp, or decryption error.boolean
User. verifyPassword(java.lang.String password)
Verify that the supplied password matches the password for this user. -
Uses of EncryptionException in org.owasp.esapi.crypto
Methods in org.owasp.esapi.crypto that throw EncryptionException Modifier and Type Method Description byte[]
CipherText. asPortableSerializedByteArray()
Return thisCipherText
object as a portable (i.e., network byte ordered) serialized byte array.static javax.crypto.SecretKey
CryptoHelper. computeDerivedKey(javax.crypto.SecretKey keyDerivationKey, int keySize, java.lang.String purpose)
Deprecated.UseKeyDerivationFunction
instead.javax.crypto.SecretKey
KeyDerivationFunction. computeDerivedKey(javax.crypto.SecretKey keyDerivationKey, int keySize, java.lang.String purpose)
The method is ESAPI's Key Derivation Function (KDF) that computes a derived key from thekeyDerivationKey
for either encryption / decryption or for authentication.static CipherText
CipherText. fromPortableSerializedBytes(byte[] bytes)
Create aCipherText
object from what is supposed to be a portable serialized byte array, given in network byte order, that represents a valid, previously serializedCipherText
object usingCipherText.asPortableSerializedByteArray()
.static javax.crypto.SecretKey
CryptoHelper. generateSecretKey(java.lang.String alg, int keySize)
Generate a random secret key appropriate to the specified cipher algorithm and key size.java.lang.String
CryptoToken. getToken()
Return the new encrypted token as a base64-encoded string, encrypted with the specifiedSecretKey
with which this object was constructed.java.lang.String
CryptoToken. getToken(javax.crypto.SecretKey skey)
Return the new encrypted token as a base64-encoded string, encrypted with the specifiedSecretKey
which may be a different key than what the token was originally encrypted with.void
CipherText. setCiphertext(byte[] ciphertext)
Set the raw ciphertext.void
CipherText. setIVandCiphertext(byte[] iv, byte[] ciphertext)
Set the IV and raw ciphertext.java.lang.String
CryptoToken. updateToken(int additionalSecs)
Update the (current) expiration time by adding the specified number of seconds to it and then re-encrypting with the currentSecretKey
that was used to construct this object.Constructors in org.owasp.esapi.crypto that throw EncryptionException Constructor Description CipherText(CipherSpec cipherSpec, byte[] cipherText)
Construct from aCipherSpec
object and the raw ciphertext.CipherTextSerializer(byte[] cipherTextSerializedBytes)
Given byte array in network byte order (i.e., big-endian order), convert it so that aCipherText
can be constructed from it.CryptoToken(java.lang.String token)
Create using previously encrypted token encrypted with default secret key from ESAPI.properties.CryptoToken(javax.crypto.SecretKey skey, java.lang.String token)
Create cryptographic token using previously encrypted token that was encrypted with specified secret key. -
Uses of EncryptionException in org.owasp.esapi.reference
Methods in org.owasp.esapi.reference that throw EncryptionException Modifier and Type Method Description void
DefaultUser. changePassword(java.lang.String oldPassword, java.lang.String newPassword1, java.lang.String newPassword2)
Sets the user's password, performing a verification of the user's old password, the equality of the two new passwords, and the strength of the new password.java.util.Map<java.lang.String,java.lang.String>
DefaultHTTPUtilities. decryptQueryString(java.lang.String encrypted)
Takes an encrypted querystring and returns a Map containing the original parameters.java.util.Map<java.lang.String,java.lang.String>
DefaultHTTPUtilities. decryptStateFromCookie()
Calls decryptStateFromCookie with the *current* request.java.util.Map<java.lang.String,java.lang.String>
DefaultHTTPUtilities. decryptStateFromCookie(javax.servlet.http.HttpServletRequest request)
Retrieves a map of data from a cookie encrypted with encryptStateInCookie().java.lang.String
DefaultHTTPUtilities. encryptHiddenField(java.lang.String value)
Encrypts a hidden field value for use in HTML.java.lang.String
DefaultHTTPUtilities. encryptQueryString(java.lang.String query)
Takes a querystring (everything after the question mark in the URL) and returns an encrypted string containing the parameters.void
DefaultHTTPUtilities. encryptStateInCookie(java.util.Map<java.lang.String,java.lang.String> cleartext)
Calls encryptStateInCookie with the *current* response.void
DefaultHTTPUtilities. encryptStateInCookie(javax.servlet.http.HttpServletResponse response, java.util.Map<java.lang.String,java.lang.String> cleartext)
Stores a Map of data in an encrypted cookie.java.lang.String
DefaultRandomizer. getRandomGUID()
Generates a random GUID.java.lang.String
FileBasedAuthenticator. hashPassword(java.lang.String password, java.lang.String accountName)
Returns a string representation of the hashed password, using the accountName as the salt. -
Uses of EncryptionException in org.owasp.esapi.reference.crypto
Methods in org.owasp.esapi.reference.crypto that throw EncryptionException Modifier and Type Method Description PlainText
JavaEncryptor. decrypt(javax.crypto.SecretKey key, CipherText ciphertext)
Decrypts the providedCipherText
using the information from it and the specified secret key.PlainText
JavaEncryptor. decrypt(CipherText ciphertext)
Decrypts the providedCipherText
using the information from it and the master encryption key as specified by the propertyEncryptor.MasterKey
as defined in theESAPI.properties
file.CipherText
JavaEncryptor. encrypt(javax.crypto.SecretKey key, PlainText plain)
Encrypts the provided plaintext bytes using the cipher transformation specified by the propertyEncryptor.CipherTransformation
as defined in theESAPI.properties
file and the specified secret key.CipherText
JavaEncryptor. encrypt(PlainText plaintext)
Encrypts the provided plaintext bytes using the cipher transformation specified by the propertyEncryptor.CipherTransformation
and the master encryption key as specified by the propertyEncryptor.MasterKey
as defined in theESAPI.properties
file.static Encryptor
JavaEncryptor. getInstance()
java.lang.String
DefaultEncryptedProperties. getProperty(java.lang.String key)
Gets the property value from the encrypted store, decrypts it, and returns the plaintext value to the caller.java.lang.String
JavaEncryptor. hash(java.lang.String plaintext, java.lang.String salt)
Returns a string representation of the hash of the provided plaintext and salt.java.lang.String
JavaEncryptor. hash(java.lang.String plaintext, java.lang.String salt, int iterations)
Returns a string representation of the hash of the provided plaintext and salt.java.lang.String
DefaultEncryptedProperties. setProperty(java.lang.String key, java.lang.String value)
Encrypts the plaintext property value and stores the ciphertext value in the encrypted store.java.lang.String
JavaEncryptor. sign(java.lang.String data)
Create a digital signature for the provided data and return it in a string.java.lang.String
JavaEncryptor. unseal(java.lang.String seal)
Unseals data (created with the seal method) and throws an exception describing any of the various problems that could exist with a seal, such as an invalid seal format, expired timestamp, or decryption error.
-