testing
This commit is contained in:
@@ -8,8 +8,8 @@ import (
|
||||
)
|
||||
|
||||
func EncryptPassword(b []byte) ([]byte, error) {
|
||||
nonce := viper.Get("nonce").(string)
|
||||
dev := viper.Get("device").(string)
|
||||
nonce := viper.GetString("nonce")
|
||||
dev := viper.GetString("device")
|
||||
|
||||
block, err := aes.NewCipher([]byte(dev))
|
||||
if err != nil {
|
||||
@@ -29,9 +29,9 @@ func EncryptPassword(b []byte) ([]byte, error) {
|
||||
}
|
||||
|
||||
func DecryptPassword(b []byte) (string, error) {
|
||||
nonce := viper.Get("nonce").(string)
|
||||
password := viper.Get("password").(string)
|
||||
dev := viper.Get("device").(string)
|
||||
nonce := viper.GetString("nonce")
|
||||
password := viper.GetString("password")
|
||||
dev := viper.GetString("device")
|
||||
|
||||
block, err := aes.NewCipher([]byte(dev))
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user