Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BadSJCLData = errors.New("Invalid data in SJCL JSON message")
Functions ¶
func GetNonce ¶
func GetNonce(encData SJCL_DataStruct) (nonce []byte, nlen int)
============================================================================================================================================
Types ¶
type SJCL_DataStruct ¶
type SJCL_DataStruct struct { InitilizationVector base64data.Base64Data `json:"iv"` // initilization vector or nonce for CCM mode Version int `json:"v"` // should be constant 1 - version - only version suppoted Iter int `json:"iter"` // PBKDF2 iteration count KeySize int `json:"ks"` // keysize in bits - devide by 8 to get GO key size for pbkdf2 TagSize int `json:"ts"` // CCM tag size in bits Mode string `json:"mode"` // - should be constant "ccm" - only format supported AdditionalData base64data.Base64Data `json:"adata"` // additional authenticated data Cipher string `json:"cipher"` // - should be constant "aes" - only fomrat supported Salt base64data.Base64Data `json:"salt"` // PBKDF2 salt CipherText base64data.Base64Data `json:"ct"` // ciphertext TagSizeBytes int `json:"-"` // Tag size converted to bytes KeySizeBytes int `json:"-"` // Key size converted to bytes Status string `json:"status"` // Response messages include a status of success/error Msg string `json:"msg"` // Error response messages include a "msg" }
func ConvertSJCL ¶
func ConvertSJCL(file string) (eBlob SJCL_DataStruct, err error, msg string)
func ReadSJCL ¶
func ReadSJCL(fn string) (eBlob SJCL_DataStruct)
Click to show internal directories.
Click to hide internal directories.