Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
56fe1308
Unverified
Commit
56fe1308
authored
Nov 09, 2017
by
Carl Bergquist
Committed by
GitHub
Nov 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9826 from agnivade/hexencoding
Use hex.EncodeToString to encode to hex
parents
d4e8e22f
143b56b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
+1
-2
pkg/util/encoding.go
+1
-2
No files found.
pkg/util/encoding.go
View file @
56fe1308
...
...
@@ -8,7 +8,6 @@ import (
"encoding/base64"
"encoding/hex"
"errors"
"fmt"
"hash"
"strings"
)
...
...
@@ -30,7 +29,7 @@ func GetRandomString(n int, alphabets ...byte) string {
func
EncodePassword
(
password
string
,
salt
string
)
string
{
newPasswd
:=
PBKDF2
([]
byte
(
password
),
[]
byte
(
salt
),
10000
,
50
,
sha256
.
New
)
return
fmt
.
Sprintf
(
"%x"
,
newPasswd
)
return
hex
.
EncodeToString
(
newPasswd
)
}
// Encode string to md5 hex value.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment