8b7b49d583
Breaking: Fix race condition with guessing messagedigest
...
- This removes messagedigest guessing as it might lead to race
conditions during decryption when an md5 digest works as a
valid key for the sha256 encrypted data
- This removes deprecated functions (the previous point introduces
a breaking change so this does not introduce another one)
fixes #10
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-11-02 12:42:27 +01:00
337596f6a2
Fix some linter warnings
...
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-09-11 12:16:18 +02:00
f7c079072c
Make digest function configurable on encrypt, add tests
...
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-09-11 10:56:37 +02:00
zhao, haitao
aea97b3627
message digest support sha1 and sha256
2018-09-11 14:55:18 +08:00
232cefd1a2
Add byte-operations, remove import path comment
...
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-04-26 11:08:28 +02:00
54263e5c8a
Add salt validation and improve comments
...
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-09-18 15:49:33 +02:00
Vojta Bartoš
317731a683
Added ability to pass custom salt to everyencrypt call
...
- created new function for encryption string which takes salt as an argument and original encrypt string is just passing generated salt as argument
2017-09-18 15:14:20 +02:00
Ben Turner
e9e25cd005
Check blocksize before retrieving Salt Header
...
`saltHeader := data[:aes.BlockSize]` will panic if the data provided is smaller than one AES Block. Return an error instead.
2017-04-04 14:08:20 -07:00
5c6e757983
Initial version of go-openssl
2015-07-17 23:50:24 +02:00