Function salt_key

Source
pub fn salt_key(key: &str, salt: i32) -> Result<String>
Expand description

Encrypts a key using the salt as AES key

This function is compatible with the Go implementation’s saltKey function.

§Arguments

  • key - The key to encrypt
  • salt - The salt value used as encryption key

§Returns

Base64-encoded encrypted key