Documentation ¶
Index ¶
Constants ¶
View Source
const AES256Id = cCryptIDAES25601
View Source
const AES256Text = cAES256TextDescription
View Source
const NoneId = cNoneId
View Source
const NoneText = cNoneDescription
View Source
const OXICRPT001encKeyIsNotSet = "OXICRPT001: Encryption key is not created, encryption/decryption is not possible"
OXICRPT001encKeyIsNotSet - OXICRPT001: Password is not set, encryption/decryption is not possible
View Source
const OXICRPT002wrongKeyLength = "OXICRPT002: key length is wrong"
OXICRPT002wrongKeyLength - OXICRPT002: key length is wrong
View Source
const OXICRPT003cipherNotFound = "OXICRPT003: cipher is not found"
OXICRPT003cipherNotFound - OXICRPT003: cipher is not found
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CipherInfo ¶ added in v1.0.8
func GetCiphers ¶ added in v1.0.8
func GetCiphers() (ci []CipherInfo)
type OxiCipher ¶ added in v1.0.8
type OxiCipher interface { CleanAndInit() // Full clean and initialization of the entity // SetPassword should be called before using encryption SetPassword(string) error // Password should be set before starting encryption/decryption SetPasswordKey([]byte) error // Setting key from bytes array GetPasswordKey() []byte // Get password current key IsPasswordSet() bool // Check if password is set and entity is ready to work Encrypt(string) (string, error) // Encrypt string, return encrypted base64 string Decrypt(string) (string, error) // Decrypt string, encrypted base64 string should be provided as input EncryptBLOB(string) ([]byte, error) // Encrypt string, return encrypted bytes DecryptBLOB([]byte) (string, error) // Decrypt encrypted bytes, return string EncryptBIN([]byte) ([]byte, error) // Encrypt bytes array, return encrypted bytes DecryptBIN([]byte) ([]byte, error) // Decrypt encrypted bytes, return bytes array GetCryptID() string // Unique ID of cipher implementation, use any alphanumeric symbols, 8 chars GetCipherName() string // Human readable name of the implemented cypher }
OxiCipher - Cipher interface, implement all the methods to attach new cipher to storage
func GetOxiCipher ¶ added in v1.0.8
GetOxiCipher - ciphers factory, get the object here
Click to show internal directories.
Click to hide internal directories.