Documentation
¶
Index ¶
- func Decrypt(ciphertext string, key []byte) (string, error)
- func DecryptWallet(appDir, password string) (map[string]interface{}, error)
- func DeriveKey(password string, salt []byte, iterations int) []byte
- func IsWalletEncrypted(appDir string) bool
- func LoadUnencryptedWallet(appDir string) (map[string]interface{}, error)
- type EncryptionMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Decrypt decrypts data using AES-256-GCM Format matches Dart: "iv:encrypted" (both base64 encoded) Supports both 12-byte (standard GCM) and 16-byte IVs (Dart default)
func DecryptWallet ¶
DecryptWallet decrypts wallet.json using the provided password Returns the decrypted wallet data as a map
func DeriveKey ¶
DeriveKey derives an encryption key from a password using PBKDF2-HMAC-SHA256 This matches the Dart implementation exactly
func IsWalletEncrypted ¶
IsWalletEncrypted checks if the wallet is encrypted
func LoadUnencryptedWallet ¶
LoadUnencryptedWallet loads wallet.json when it's not encrypted
Types ¶
type EncryptionMetadata ¶
type EncryptionMetadata struct {
Salt string `json:"salt"`
Iterations int `json:"iterations"`
Encrypted bool `json:"encrypted"`
Version string `json:"version"`
}
EncryptionMetadata stores encryption parameters
func LoadMetadata ¶
func LoadMetadata(appDir string) (*EncryptionMetadata, error)
LoadMetadata reads wallet_encryption.json
Click to show internal directories.
Click to hide internal directories.