For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
// | |
// Created by はるふ on 2017/12/11. | |
// Copyright © 2017年 ha1f. All rights reserved. | |
// | |
import Foundation | |
import CoreImage | |
import AVFoundation | |
extension CIFilter { |
wget -i image-list.txt --force-directories |
import Foundation | |
class StreamReader { | |
let encoding: String.Encoding | |
let chunkSize: Int | |
let fileHandle: FileHandle | |
var buffer: Data | |
let delimPattern : Data | |
var isAtEOF: Bool = false | |
Dump a password into keychain. I'm using the creator/kind codes "asbl" for Ansible, but you can use any 4 character code. It's useful for doing lookups later.
$ security add-generic-password -a "root" -c "asbl" -C "asbl" -D "Ansible Vault" -s "ansible secrets" -w "secret123password456"
From man security: