pkcs8
pkcs8 copied to clipboard
Add DES-CBC block cipher support
Hi there,
I need the DES-CBC block cipher, it's relatively easy to do with a new file cipher_des.go
:
var (
oidDESCBC = asn1.ObjectIdentifier{1, 3, 14, 3, 2, 7}
)
func init() {
RegisterCipher(oidDESCBC, func() Cipher {
return DESCBC
})
}
// DESCBC is the DES cipher in CBC mode.
var DESCBC = cipherWithBlock{
ivSize: des.BlockSize,
keySize: 8,
newBlock: des.NewCipher,
oid: oidDESCBC,
}
Let me know if you want me to PR this or if you would see any problem with this. Thanks!