Versions in this module Expand all Collapse all v1 v1.0.8 Jan 19, 2024 Changes in this version + var ErrInvalidCryptoLayer = errors.New("invalid crypto layer") + var ErrInvalidKey = errors.New("invalid key") + func BlockAlgorithmExists(algorithmId uint8) bool + func DecryptAES(key, data []byte) []byte + func DecryptData(key, data []byte) []byte + func EncryptAES(key, data []byte) []byte + func EncryptData(key, data []byte) []byte + type AlgorithmSupporter interface + GetAlgorithm func() WotoAlgorithm + GetHashCount func() int + HasEqualAlgorithm func(algorithm WotoAlgorithm) bool + SetAlgorithm func(algorithm WotoAlgorithm) bool + type CryptoLayer struct + Hash string + Kind CryptoLayerKind + func (l *CryptoLayer) Equal(layer *CryptoLayer) bool + func (l *CryptoLayer) GetLayerLength() *LayerLengthContainer + func (l *CryptoLayer) IsValid() bool + func (l *CryptoLayer) ToBytes() ([]byte, error) + type CryptoLayerKind uint8 + const CryptoLayerKindO108 + const CryptoLayerKindO216 + const CryptoLayerKindO27 + const CryptoLayerKindO54 + type KeyCollection interface + ContinueLifeCycle func() + Sync func() + type KeyLayerCollection []CryptoLayer + func (c KeyLayerCollection) Contains(layer *CryptoLayer) bool + func (c KeyLayerCollection) ContainsKind(kind CryptoLayerKind) bool + func (c KeyLayerCollection) GetKeyLength() int + func (c KeyLayerCollection) GetLayerByIndex(index int) *CryptoLayer + func (c KeyLayerCollection) GetLayerLengthByKind(kind CryptoLayerKind) *LayerLengthContainer + func (c KeyLayerCollection) IsValid() bool + type KeysContainer interface + SetAsKeys func(value KeyCollection) + type LayerBlock interface + AppendLayer func(layer *CryptoLayer) bool + ContainsLayer func(layer *CryptoLayer) bool + ContainsLayerKind func(kind CryptoLayerKind) bool + GetKeyLayersCount func() int + GetLayerLengthByIndex func(index int) *LayerLengthContainer + GetLayerLengthByKind func(kind CryptoLayerKind) *LayerLengthContainer + RemoveLayer func(layer *CryptoLayer) bool + RemoveLayers func(layers ...*CryptoLayer) + type LayerLengthContainer struct + LayerKind CryptoLayerKind + Length WotoLayerLength + func (c *LayerLengthContainer) IsValid() bool + type PasswordContainer256 = passContainer.PasswordContainer256 + type PasswordContainer512 = passContainer.PasswordContainer256 + type WotoAlgorithm uint16 + const WotoAlgorithmM250 + const WotoAlgorithmM251 + const WotoAlgorithmM252 + const WotoAlgorithmM253 + type WotoKey interface + CanBecomeFuture func() bool + CanBecomePast func() bool + CanBecomePresent func() bool + Clone func() WotoKey + Decrypt func(data []byte) []byte + Encrypt func(data []byte) []byte + GetKeyLength func() int + GetSignatureRealLength func() int + HasEqualKind func(key WotoKey) bool + HasEqualSignature func(key WotoKey) bool + IsEmpty func() bool + IsFuture func() bool + IsPast func() bool + IsPresent func() bool + IsRealLengthInvalid func() bool + ToFutureKey func() WotoKey + ToPastKey func() WotoKey + ToPresentKey func() WotoKey + func GenerateFutureKey(pastKey WotoKey) WotoKey + func GeneratePresentKey(algo WotoAlgorithm) WotoKey + type WotoLayerLength uint32