Add Encrypt() and Decrypt() functionality
This commit is contained in:
19
pkg/transcrypt/cipherSuite.go
Normal file
19
pkg/transcrypt/cipherSuite.go
Normal file
@ -0,0 +1,19 @@
|
||||
package transcrypt
|
||||
|
||||
type CipherSuite byte
|
||||
|
||||
const (
|
||||
AES_256_GCM CipherSuite = iota
|
||||
CHACHA20_POLY1305
|
||||
)
|
||||
|
||||
func GetCipherSuite(s string) CipherSuite {
|
||||
switch s {
|
||||
case "AES_256_GCM":
|
||||
return AES_256_GCM
|
||||
case "CHACHA20_POLY1305":
|
||||
return CHACHA20_POLY1305
|
||||
default:
|
||||
return CHACHA20_POLY1305
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user