Documentation
¶
Index ¶
Constants ¶
View Source
const BlockSize = 8
BlockSize is the Blowfish block size in bytes (8 bytes).
View Source
const ErrKeySize = "blowfish: invalid key size"
ErrKeySize is the error returned when the key has an invalid size.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
Cipher is an instance of the Blowfish cipher.
func NewCipher ¶
NewCipher creates and returns a Cipher. The key must be between 1 and 56 bytes long.
func NewSaltedCipher ¶
NewSaltedCipher creates and returns a Cipher that folds a salt into its key schedule. For bcrypt compatibility, the key may exceed 56 bytes.
Click to show internal directories.
Click to hide internal directories.