这里是新手,所以我可能做的完全错误,但是这段代码不断给我错误: 我正在使用ruby larskanis / pkcs11 gem:https://github.com/larskanis/pkcs11
错误: /gems/pkcs11-0.2.7/lib/pkcs11/helper.rb:126:在`to_mechanism'中:未知的机制-请使用String / Int / Struct作为机制参数(ArgumentError)
代码:
iv = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].pack('C*')
mechanism = {:AES_GCM => {:iv=>iv}}
cryptogram = @session.encrypt(mechanism, obj, 'plaintext')