Documentation
¶
Overview ¶
Package jasypt was created to assist in the decryption of jasypt-encrypted values. Many of the algorithms in this package are for legacy use only. Please use strong cryptographic algorithms and keys when encrypting your sensitive plaintext.
Note that many times base64 encoding has been applied to jasypt output, and thus you will likely need to base64 decode any strings before attempting to decrypt them.
Index ¶
Constants ¶
const (
AlgoPBEWithMD5AndDES = "PBEWithMD5AndDES"
)
Common implemented decryption algorithms
const (
MaxLenMD5 = 20
)
Constants for maximum PBKDF1 key lengths
Variables ¶
var ( // ErrEmptyPassword denotes that a password is missing or empty. This is a // soft error. ErrEmptyPassword = fmt.Errorf("the password used was empty") // ErrExceededLength indicates that for a given hash function, the maximum // pbkdf1 length has been exceeded. ErrExceededLength = fmt.Errorf("derived key too long for md5") )
Functions ¶
func DecryptJasypt ¶
DecryptJasypt takes bytes encrypted by the default Jasypt PBEWithMD5AndDES implementation, as well as a password, decrypts the byte slice, and returns a slice of the decrypted bytes. Any errors encountered will be returned.