1 // Copyright 2017 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 "golang.org/x/crypto/scrypt"
16 // DO NOT use this salt value; generate your own random salt. 8 bytes is
18 salt := []byte{0xc8, 0x28, 0xf2, 0x58, 0xa7, 0x6a, 0xad, 0x7b}
20 dk, err := scrypt.Key([]byte("some password"), salt, 1<<15, 8, 1, 32)
24 fmt.Println(base64.StdEncoding.EncodeToString(dk))
25 // Output: lGnMz8io0AUkfzn6Pls1qX20Vs7PGN6sbYQ2TQgY12M=