Documentation ¶
Index ¶
- Constants
- Variables
- func Log2(v *big.Int) int
- type Cache
- type Cipher
- type DFA
- func (dfa *DFA) Capacity() int
- func (dfa *DFA) Close() error
- func (dfa *DFA) N() int
- func (dfa *DFA) NumWordsInLanguage(min, max int) (*big.Int, error)
- func (dfa *DFA) NumWordsInSlice(n int) (*big.Int, error)
- func (dfa *DFA) Rank(s string) (*big.Int, error)
- func (dfa *DFA) Regex() string
- func (dfa *DFA) Unrank(rank *big.Int) (string, error)
- type Decrypter
- type Encrypter
Constants ¶
View Source
const ( IV_LENGTH = 7 MSG_COUNTER_LENGTH = 8 CTXT_EXPANSION = 1 + IV_LENGTH + MSG_COUNTER_LENGTH + aes.BlockSize )
View Source
const (
COVERTEXT_HEADER_LEN_CIPHERTTEXT = 16
)
Variables ¶
View Source
var ( ErrShortCiphertext = errors.New("fte: short ciphertext") ErrInvalidMessageLength = errors.New("fte: invalid message length") ErrHMACVerificationFailed = errors.New("fte: hmac verification failed") )
View Source
var ( K1 = []byte("\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff") K2 = []byte("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") )
View Source
var (
ErrInsufficientCapacity = errors.New("fte: insufficient capacity")
)
View Source
var (
ErrLanguageIsEmptySet = errors.New("fte: language is empty set")
)
View Source
var Verbose bool
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache represents a cache of Ciphers & DFAs.
func (*Cache) Cipher ¶
Cipher returns a instance of Cipher associated with regex & n. Creates a new cipher if one doesn't already exist.
type Cipher ¶
type Cipher struct {
// contains filtered or unexported fields
}
type DFA ¶
type DFA struct {
// contains filtered or unexported fields
}
type Decrypter ¶
type Decrypter struct {
// contains filtered or unexported fields
}
func NewDecrypter ¶
func (*Decrypter) CiphertextLen ¶
Click to show internal directories.
Click to hide internal directories.