Documentation ¶
Index ¶
- Variables
- func AllZero(s []byte) bool
- func CSPRNG(n int64) ([]byte, error)
- func CSPRNGHex(n int64) (string, error)
- func Compare(x, y []byte) bool
- func CompareString(x, y string) bool
- func Delete(targetPath string, cycle int) error
- func FileWalkByName(startPath, name string) ([]string, error)
- func HWRng(n int64) ([]byte, error)
- func IsRepeatingSequence(key []byte) bool
- func Overwrite(targetPath string, data []byte, cycle int) error
- func Rand() io.Reader
- func ReadFileContent(path string) ([]byte, error)
- func StrCnct(str ...string) string
- func WriteAndFlush(file *os.File, rnd []byte) (n int, err error)
- type Base32
- type Base64
- type Custom
- type Encoder
- type Hex
- type ImportExport
- type PKCS
- type PKIX
- type PaddinglessBase32
- type RawBase64
- type RawURLBase64
- type URLBase64
Constants ¶
This section is empty.
Variables ¶
var ErrCustomEncoderIsNil = errors.New("custom encoder is nil")
Functions ¶
func CompareString ¶
func FileWalkByName ¶
func IsRepeatingSequence ¶ added in v0.1.1
func ReadFileContent ¶
Types ¶
type Base64 ¶
type Base64 struct{}
StdEncoding is the standard base64 encoding, as defined in RFC 4648.
type ImportExport ¶
type PKCS ¶
type PKCS struct { SecretKey ed25519.PrivateKey ImportData string ExportData string Encoder Encoder }
type PKIX ¶
type PKIX struct { PublicKey ed25519.PublicKey ImportData string ExportData string ExportPublicKey crypto.PublicKey Encoder Encoder }
PKIX is a generic struct for import and export Ed25519 public key One way to import: 1. ImportData (string) -> PublicKey (ed25519.PublicKey) Two ways to export: 1. PublicKey (ed25519.PublicKey) -> ExportData (string) 2. ExportPublicKey (crypto.PublicKey) -> ExportData (string).
type PaddinglessBase32 ¶
type PaddinglessBase32 struct{}
func (*PaddinglessBase32) Encode ¶
func (b *PaddinglessBase32) Encode(data []byte) string
func (*PaddinglessBase32) GetName ¶ added in v0.1.1
func (b *PaddinglessBase32) GetName() string
type RawBase64 ¶
type RawBase64 struct{}
nolint: lll RawStdEncoding is the standard raw, unpadded base64 encoding, as defined in RFC 4648 section 3.2. This is the same as StdEncoding but omits padding characters.
type RawURLBase64 ¶ added in v0.1.0
type RawURLBase64 struct{}
nolint: lll RawURLEncoding is the unpadded alternate base64 encoding defined in RFC 4648. It is typically used in URLs and file names. This is the same as URLEncoding but omits padding characters.
func (*RawURLBase64) Decode ¶ added in v0.1.0
func (b *RawURLBase64) Decode(data string) ([]byte, error)
func (*RawURLBase64) Encode ¶ added in v0.1.0
func (b *RawURLBase64) Encode(data []byte) string
func (*RawURLBase64) GetName ¶ added in v0.1.1
func (b *RawURLBase64) GetName() string