-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
60 lines (42 loc) · 1.61 KB
/
const.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package bcrypt
import (
"github.com/go-crypt/crypt/algorithm"
)
const (
// EncodingFmt is the encoding format for this algorithm.
EncodingFmt = "$%s$%d$%s%s"
// EncodingFmtSHA256 is the encoding format for the SHA256 variant of this algorithm.
EncodingFmtSHA256 = "$%s$v=2,t=%s,r=%d$%s$%s"
// AlgName is the name for this algorithm.
AlgName = "bcrypt"
// AlgIdentifier is the identifier used in this algorithm.
AlgIdentifier = "2b"
// AlgIdentifierVariantSHA256 is the identifier used in encoded SHA256 variant of this algorithm.
AlgIdentifierVariantSHA256 = "bcrypt-sha256"
// AlgIdentifierVerA is the identifier used in this algorithm (version a).
AlgIdentifierVerA = "2a"
// AlgIdentifierVerX is the identifier used in this algorithm (version x).
AlgIdentifierVerX = "2x"
// AlgIdentifierVerY is the identifier used in this algorithm (version y).
AlgIdentifierVerY = "2y"
// AlgIdentifierUnversioned is the identifier used in this algorithm (no version).
AlgIdentifierUnversioned = "2"
// VariantNameStandard is the variant name of the bcrypt.VariantStandard.
VariantNameStandard = "standard"
// VariantNameSHA256 is the variant name of the bcrypt.VariantSHA256.
VariantNameSHA256 = algorithm.DigestSHA256
// IterationsMin is the minimum iterations accepted.
IterationsMin = 10
// IterationsMax is the maximum iterations accepted.
IterationsMax = 31
// IterationsDefault is the default iterations.
IterationsDefault = 13
// PasswordInputSizeMax is the maximum password input size accepted.
PasswordInputSizeMax = 72
variantDefault = VariantStandard
)
const (
oV = "v"
oT = "t"
oR = "r"
)