Files
Roger 410bffe643 refactor: naming cleanup and crypto package improvements (#551)
* refactor: naming cleanup across all packages
2026-04-05 16:51:56 +08:00

16 lines
679 B
Go

package crypto
import "errors"
// Sentinel errors for crypto operations.
var (
errShortCiphertext = errors.New("ciphertext too short")
errInvalidBlockSize = errors.New("ciphertext is not a multiple of the block size")
errInvalidIVLength = errors.New("IV length must equal block size")
errInvalidPadding = errors.New("invalid PKCS5 padding")
errInvalidNonceLen = errors.New("nonce length must equal GCM nonce size")
errUnsupportedIVLen = errors.New("unsupported IV length")
errDecodeASN1 = errors.New("failed to decode ASN1 data")
errDPAPINotSupported = errors.New("DPAPI not supported on this platform") //nolint:unused // used on darwin/linux only
)