40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'lib/ccrypto/ruby/engines/cipher_engine.rb', line 40
def self.to_openssl_spec(spec)
res = []
teLogger.debug "to_openssl_spec #{spec}"
case spec.algo
when :blowfish
res << "bf"
else
res << spec.algo
end
res << spec.keysize if not_empty?(spec.keysize) and spec.keysize.to_i > 0 and not spec.is_algo?(:chacha20) and not spec.is_algo?(:seed) and not spec.is_algo?(:sm4) and not spec.is_algo?(:blowfish)
res << spec.mode
teLogger.debug "to_openssl_spec #{res}"
res.join("-")
end
|