yEnc 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/y_enc.rb +9 -2
- metadata +1 -1
data/lib/y_enc.rb
CHANGED
@@ -20,6 +20,7 @@ class YEnc
|
|
20
20
|
next
|
21
21
|
end
|
22
22
|
if line.include?("=yend")
|
23
|
+
breakdown_endline line
|
23
24
|
begin_read=false
|
24
25
|
break #stop looking through the file we are done
|
25
26
|
end
|
@@ -60,7 +61,10 @@ class YEnc
|
|
60
61
|
|
61
62
|
#Does this pass the crc32 check
|
62
63
|
def pass_crc32?
|
63
|
-
|
64
|
+
f = nil
|
65
|
+
File.open(@outputpath + @filename, "rb") { |h| f = h.read }
|
66
|
+
crc32 = Zlib.crc32(f,0).to_s(16)
|
67
|
+
crc32.eql?(@crc32.downcase.strip)
|
64
68
|
end
|
65
69
|
|
66
70
|
private
|
@@ -80,4 +84,7 @@ class YEnc
|
|
80
84
|
@new_file = File.new(@outputpath + @filename, "wb")
|
81
85
|
end
|
82
86
|
|
83
|
-
end
|
87
|
+
end
|
88
|
+
|
89
|
+
#y = YEnc.new("/Users/scontapay/yenc.txt", "/Users/scontapay/")
|
90
|
+
#y.decode
|