lib/pkernel_jce/identity.rb in pkernel_jce-0.2 vs lib/pkernel_jce/identity.rb in pkernel_jce-0.3
- old
+ new
@@ -196,15 +196,18 @@
baos = java.io.ByteArrayOutputStream.new
file = opts[:file]
if file.nil? or file.empty?
ks.store(baos, pass.to_java.toCharArray)
- baos.toByteArray
+ #baos.toByteArray
+ result[:bin] = baos.toByteArray
else
fos = java.io.FileOutputStream.new(file)
ks.store(fos, pass.to_java.toCharArray)
fos.flush
fos.close
+
+ result[:file] = file
end
result
end