2011-03-10 05:11:03 +00:00
|
|
|
class Bcrypt < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Cross platform file encryption utility using blowfish"
|
2014-12-31 12:03:06 +00:00
|
|
|
homepage "http://bcrypt.sourceforge.net"
|
|
|
|
url "http://bcrypt.sourceforge.net/bcrypt-1.1.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "b9c1a7c0996a305465135b90123b0c63adbb5fa7c47a24b3f347deb2696d417d"
|
2010-02-06 19:12:04 +00:00
|
|
|
|
2014-12-31 12:43:27 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-11-19 15:45:31 +00:00
|
|
|
sha256 "dbd530bd84a1e92120aacf07f60e3b6131c92421702ab8b9f9e02d3b72a00ad6" => :yosemite
|
|
|
|
sha256 "2a0a662d778677d75222745b30e6c5e825078855d303cf853609f50b1ceca4a6" => :mavericks
|
|
|
|
sha256 "7f9c94e9c1527e596b316746d9705f524afb70c661abeb1279bf2c88ad061ddf" => :mountain_lion
|
2014-12-31 12:43:27 +00:00
|
|
|
end
|
|
|
|
|
2010-02-06 19:12:04 +00:00
|
|
|
def install
|
2012-02-10 02:31:40 +00:00
|
|
|
system "make", "CC=#{ENV.cc}",
|
|
|
|
"CFLAGS=#{ENV.cflags}",
|
|
|
|
"LDFLAGS=-lz"
|
2010-02-07 00:05:34 +00:00
|
|
|
bin.install "bcrypt"
|
|
|
|
man1.install gzip("bcrypt.1")
|
2010-02-06 19:12:04 +00:00
|
|
|
end
|
2014-12-31 12:33:24 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.txt").write("Hello World!")
|
|
|
|
pipe_output("#{bin}/bcrypt -r test.txt", "12345678\n12345678\n")
|
|
|
|
mv "test.txt.bfe", "test.out.txt.bfe"
|
|
|
|
pipe_output("#{bin}/bcrypt -r test.out.txt.bfe", "12345678\n")
|
|
|
|
assert_equal File.read("test.txt"), File.read("test.out.txt")
|
|
|
|
end
|
2010-02-06 19:12:04 +00:00
|
|
|
end
|