2020-05-12 02:57:46 +08:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
// Package encryption collects common cryptographic primitives needed for path and data encryption.
|
|
|
|
package encryption
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/zeebo/errs"
|
|
|
|
)
|
|
|
|
|
2020-05-29 21:08:11 +08:00
|
|
|
// Error is the default encryption errs class.
|
2020-05-12 02:57:46 +08:00
|
|
|
var Error = errs.Class("encryption error")
|
|
|
|
|
2020-05-29 21:08:11 +08:00
|
|
|
// ErrDecryptFailed is the errs class when the decryption fails.
|
2020-05-12 02:57:46 +08:00
|
|
|
var ErrDecryptFailed = errs.Class("decryption failed, check encryption key")
|
|
|
|
|
2020-05-29 21:08:11 +08:00
|
|
|
// ErrInvalidConfig is the errs class for invalid configuration.
|
2020-05-12 02:57:46 +08:00
|
|
|
var ErrInvalidConfig = errs.Class("invalid encryption configuration")
|