Documentation ¶
Index ¶
- Variables
- func CompareHashAndPassword(hash, pass []byte) error
- func New(pass []byte, opts ...Option) ([]byte, error)
- type Kdf
- func (*Kdf) Descriptor() ([]byte, []int)
- func (m *Kdf) GetAlg() Kdf_HashAlg
- func (m *Kdf) GetIter() int64
- func (m *Kdf) GetKey() []byte
- func (m *Kdf) GetKeyLen() int64
- func (m *Kdf) GetSalt() []byte
- func (*Kdf) ProtoMessage()
- func (m *Kdf) Reset()
- func (m *Kdf) String() string
- func (m *Kdf) XXX_DiscardUnknown()
- func (m *Kdf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Kdf) XXX_Merge(src proto.Message)
- func (m *Kdf) XXX_Size() int
- func (m *Kdf) XXX_Unmarshal(b []byte) error
- type Kdf_HashAlg
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilData = errors.New("jo: Pass or Hash cannot be nil") ErrMismatched = errors.New("jo: No match found") )
View Source
var Kdf_HashAlg_name = map[int32]string{
0: "SHA256",
1: "SHA512",
2: "SHA3_224",
3: "SHA3_256",
4: "SHA3_384",
5: "SHA3_512",
}
View Source
var Kdf_HashAlg_value = map[string]int32{
"SHA256": 0,
"SHA512": 1,
"SHA3_224": 2,
"SHA3_256": 3,
"SHA3_384": 4,
"SHA3_512": 5,
}
Functions ¶
func CompareHashAndPassword ¶
Types ¶
type Kdf ¶
type Kdf struct { Salt []byte `protobuf:"bytes,1,opt,name=salt,proto3" json:"salt,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` KeyLen int64 `protobuf:"varint,3,opt,name=key_len,json=keyLen,proto3" json:"key_len,omitempty"` Iter int64 `protobuf:"varint,4,opt,name=iter,proto3" json:"iter,omitempty"` Alg Kdf_HashAlg `protobuf:"varint,5,opt,name=alg,proto3,enum=jo.Kdf_HashAlg" json:"alg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Kdf) Descriptor ¶
func (*Kdf) GetAlg ¶
func (m *Kdf) GetAlg() Kdf_HashAlg
func (*Kdf) ProtoMessage ¶
func (*Kdf) ProtoMessage()
func (*Kdf) XXX_DiscardUnknown ¶
func (m *Kdf) XXX_DiscardUnknown()
func (*Kdf) XXX_Unmarshal ¶
type Kdf_HashAlg ¶
type Kdf_HashAlg int32
const ( Kdf_SHA256 Kdf_HashAlg = 0 Kdf_SHA512 Kdf_HashAlg = 1 Kdf_SHA3_224 Kdf_HashAlg = 2 Kdf_SHA3_256 Kdf_HashAlg = 3 Kdf_SHA3_384 Kdf_HashAlg = 4 Kdf_SHA3_512 Kdf_HashAlg = 5 )
func (Kdf_HashAlg) EnumDescriptor ¶
func (Kdf_HashAlg) EnumDescriptor() ([]byte, []int)
func (Kdf_HashAlg) String ¶
func (x Kdf_HashAlg) String() string
Click to show internal directories.
Click to hide internal directories.