Documentation ¶
Overview ¶
Copyright 2016, Cossack Labs Limited
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016, Cossack Labs Limited ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016, Cossack Labs Limited ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func AbsPath(path string) (string, error)
- func ErrorMessage(msg string, err error) string
- func FileExists(path string) (bool, error)
- func FillSlice(value byte, data []byte)
- func FindTag(symbol byte, count int, block []byte) int
- func GetConfigPathByName(name string) string
- func IsPrintableEscapeChar(c byte) bool
- func LoadPrivateKey(path string) (*keys.PrivateKey, error)
- func LoadPublicKey(path string) (*keys.PublicKey, error)
- func Min(x, y int) int
- func ReadData(reader io.Reader) ([]byte, error)
- func ReadFile(path string) ([]byte, error)
- func ReadSessionData(reader io.Reader) ([]byte, error)
- func SendData(data []byte, conn io.Writer) error
- func SendSessionData(data []byte, conn io.Writer) error
- func WriteFull(data []byte, wr io.Writer) (int, error)
Constants ¶
const (
NOT_FOUND = -1
)
const (
SESSION_DATA_LIMIT = 8 * 1024 // 8 kb
)
const (
SLASH_CHAR = 92
)
Variables ¶
var ErrBigDataBlockSize = fmt.Errorf("Block size greater than %v", SESSION_DATA_LIMIT)
Functions ¶
func ErrorMessage ¶
function for standartizing custom messages with messages from error
func FileExists ¶
func GetConfigPathByName ¶
func IsPrintableEscapeChar ¶
return true if character is ascii printable (code between 32 and 126)
func LoadPrivateKey ¶
func LoadPrivateKey(path string) (*keys.PrivateKey, error)
Types ¶
This section is empty.