Documentation ¶
Index ¶
- Constants
- Variables
- func CalcHMAC(cipherText, hmacKey []byte) string
- func CreateSalt() ([]byte, error)
- func Decrypt(text, password string) (string, []byte, error)
- func Derivekeys(password string, salt []byte) (cipherKey, hmacKey, iv []byte)
- func Encrypt(text, password, label string, srcSalt []byte) (string, error)
- func ThroughCipher(src, cipherKey, iv []byte) ([]byte, error)
Constants ¶
View Source
const BLOCK_SIZE = 16
AESにおける1ブロックあたりのバイト数
View Source
const FILE_HEADER_11 = "$ANSIBLE_VAULT;1.1;AES256"
Ansible Vaultヘッダ(1.1)
View Source
const FILE_HEADER_12 = "$ANSIBLE_VAULT;1.2;AES256;"
Ansible Vaultヘッダ(1.2)
View Source
const FILE_HEADER_PATTERN = "\\A\\$ANSIBLE_VAULT;1\\.\\d;AES(?:256)?(?:;.+)?"
Ansible Vaultヘッダを表す正規表現
View Source
const IV_LENGTH = 16
Initialization Vectorの長さ
View Source
const KDF_ITERATIONS = 10000
共通鍵生成時の繰り返し回数
View Source
const KEY_LENGTH = 32
共通鍵・HMAC鍵の長さ
View Source
const LINE_PER_CHARS = 80
一行あたりの文字数
Variables ¶
View Source
var HASH_ALGORITHM = sha256.New
共通鍵・HMACを作成する際のハッシュ関数名
Functions ¶
func Derivekeys ¶
鍵を生成する
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.