File: password.go

package info (click to toggle)
golang-github-mesos-mesos-go 0.0.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,964 kB
  • ctags: 6,435
  • sloc: makefile: 18
file content (20 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package callback

type Password struct {
	password []byte
}

func NewPassword() *Password {
	return &Password{}
}

func (cb *Password) Get() []byte {
	clone := make([]byte, len(cb.password))
	copy(clone, cb.password)
	return clone
}

func (cb *Password) Set(password []byte) {
	cb.password = make([]byte, len(password))
	copy(cb.password, password)
}