mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-10-17 19:48:15 +02:00
feat: Implement storage provider management functionality
- Added new routes and handlers for managing storage providers, including creation, editing, and deletion. - Introduced a new StorageProvider form component for user input. - Enhanced the database schema to support storage provider references in transfer configurations. - Implemented encryption for sensitive fields in storage provider data. - Added tests for storage provider API endpoints and integration with the database. - Updated frontend components to support storage provider selection and testing.
This commit is contained in:
1 parent
88d0ac815a
commit
31871bd16e
59 files changed
+15842
-594
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package encryption
|
||||
|
||||
// Key size constants
|
||||
const (
|
||||
// AES256KeySize is the key size in bytes for AES-256 encryption (32 bytes = 256 bits)
|
||||
AES256KeySize = 32
|
||||
|
||||
// AESBlockSize is the block size for AES encryption
|
||||
AESBlockSize = 16
|
||||
|
||||
// DefaultKeyEnvVar is the default environment variable name for the encryption key
|
||||
DefaultKeyEnvVar = "GOMFT_ENCRYPTION_KEY"
|
||||
|
||||
// MinKeyLength is the minimum allowed length for encryption keys in bytes
|
||||
MinKeyLength = AES256KeySize
|
||||
)
|
||||
|
||||
// Error messages
|
||||
const (
|
||||
ErrKeyTooShort = "encryption key is too short, must be at least %d bytes"
|
||||
ErrKeyNotProvided = "encryption key not provided in environment variable %s"
|
||||
ErrInvalidKey = "provided encryption key is invalid: %s"
|
||||
)
|
||||
Reference in new issue
Block a user