{"id":24956872,"url":"https://github.com/andrewstuart/go-jasypt","last_synced_at":"2025-09-20T23:07:39.353Z","repository":{"id":43649585,"uuid":"92532050","full_name":"andrewstuart/go-jasypt","owner":"andrewstuart","description":"Golang functions and structs for decrypting Jasypt-encrypted values","archived":false,"fork":false,"pushed_at":"2018-12-13T02:57:21.000Z","size":13,"stargazers_count":9,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T07:09:47.442Z","etag":null,"topics":["decrypt","golang","jasypt","pbkdf1"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewstuart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-26T17:07:51.000Z","updated_at":"2023-07-24T05:28:48.000Z","dependencies_parsed_at":"2022-07-12T18:19:31.499Z","dependency_job_id":null,"html_url":"https://github.com/andrewstuart/go-jasypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andrewstuart/go-jasypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fgo-jasypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fgo-jasypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fgo-jasypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fgo-jasypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewstuart","download_url":"https://codeload.github.com/andrewstuart/go-jasypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewstuart%2Fgo-jasypt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266786798,"owners_count":23983871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decrypt","golang","jasypt","pbkdf1"],"created_at":"2025-02-03T06:41:29.050Z","updated_at":"2025-09-20T23:07:34.281Z","avatar_url":"https://github.com/andrewstuart.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jasypt\n--\n    import \"astuart.co/go-jasypt\"\n\nPackage jasypt was created to assist in the decryption of jasypt-encrypted\nvalues. Many of the algorithms in this package are for legacy use only. Please\nuse strong cryptographic algorithms and keys when encrypting your sensitive\nplaintext.\n\nNote that many times base64 encoding has been applied to jasypt output, and thus\nyou will likely need to base64 decode any strings before attempting to decrypt\nthem.\n\n## Usage\n\n```go\nconst (\n\tAlgoPBEWithMD5AndDES = \"PBEWithMD5AndDES\"\n)\n```\nCommon implemented decryption algorithms\n\n```go\nconst (\n\tMaxLenMD5 = 20\n)\n```\nConstants for maximum PBKDF1 key lengths\n\n```go\nvar (\n\t// ErrEmptyPassword denotes that a password is missing or empty. This is a\n\t// soft error.\n\tErrEmptyPassword = fmt.Errorf(\"the password used was empty\")\n\t// ErrExceededLength indicates that for a given hash function, the maximum\n\t// pbkdf1 length has been exceeded.\n\tErrExceededLength = fmt.Errorf(\"derived key too long for md5\")\n)\n```\n\n#### func  DecryptJasypt\n\n```go\nfunc DecryptJasypt(encrypted []byte, password string) ([]byte, error)\n```\nDecryptJasypt takes bytes encrypted by the default Jasypt PBEWithMD5AndDES\nimplementation, as well as a password, decrypts the byte slice, and returns a\nslice of the decrypted bytes. Any errors encountered will be returned.\n\n#### func  PBKDF1MD5\n\n```go\nfunc PBKDF1MD5(pass, salt []byte, count, l int) ([]byte, error)\n```\nPBKDF1MD5 takes a password and salt, as well as an iteration count and key\nlength in bytes, and a hash function, and returns the derived key and an error\nin the case that the key was too short.\n\n#### type Decryptor\n\n```go\ntype Decryptor struct {\n\tPassword, Algorithm string\n}\n```\n\nA Decryptor encapsulates a password and Algorithm for more easily using common\ndecryption across multiple ciphertexts.\n\n#### func (Decryptor) Decrypt\n\n```go\nfunc (d Decryptor) Decrypt(bs []byte) ([]byte, error)\n```\nDecrypt takes a slice of bytes and decrypts based on the password and algorithm\nspecified, returning the slice of decrypted byts and any errors encountered.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewstuart%2Fgo-jasypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewstuart%2Fgo-jasypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewstuart%2Fgo-jasypt/lists"}