Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
04d42528
Commit
04d42528
authored
Jul 01, 2021
by
Brad Davidson
Committed by
Chris Kim
Jul 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spelling to satisfy codespell check
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
733ca42b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
encrypt.go
pkg/cluster/encrypt.go
+2
-2
No files found.
pkg/cluster/encrypt.go
View file @
04d42528
...
...
@@ -30,7 +30,7 @@ func keyHash(passphrase string) string {
}
// encrypt encrypts a byte slice using aes+gcm with a pbkdf2 key derived from the passphrase and a random salt.
// It returns a byte slice containing the salt and base64-encoded c
y
phertext.
// It returns a byte slice containing the salt and base64-encoded c
i
phertext.
func
encrypt
(
passphrase
string
,
plaintext
[]
byte
)
([]
byte
,
error
)
{
salt
,
err
:=
token
.
Random
(
8
)
if
err
!=
nil
{
...
...
@@ -59,7 +59,7 @@ func encrypt(passphrase string, plaintext []byte) ([]byte, error) {
}
// decrypt attempts to decrypt the byte slice using the supplied passphrase.
// The input byte slice should be the c
y
phertext output from the encrypt function.
// The input byte slice should be the c
i
phertext output from the encrypt function.
func
decrypt
(
passphrase
string
,
ciphertext
[]
byte
)
([]
byte
,
error
)
{
parts
:=
strings
.
SplitN
(
string
(
ciphertext
),
":"
,
2
)
if
len
(
parts
)
!=
2
{
...
...
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