Class: Ccrypto::Java::RSAPublicKey
- Inherits:
-
RSAPublicKey
- Object
- RSAPublicKey
- Ccrypto::Java::RSAPublicKey
show all
- Defined in:
- lib/ccrypto/java/engines/rsa_engine.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(mtd, *args, &block) ⇒ Object
20
21
22
|
# File 'lib/ccrypto/java/engines/rsa_engine.rb', line 20
def method_missing(mtd, *args, &block)
@native_pubKey.send(mtd, *args, &block)
end
|
Class Method Details
.to_key(bin) ⇒ Object
15
16
17
18
|
# File 'lib/ccrypto/java/engines/rsa_engine.rb', line 15
def self.to_key(bin)
pubKey = java.security.KeyFactory.getInstance("RSA", "BC").generatePublic(java.security.spec.X509EncodedKeySpec.new(bin))
RSAPublicKey.new(pubKey)
end
|
Instance Method Details
#to_bin ⇒ Object
11
12
13
|
# File 'lib/ccrypto/java/engines/rsa_engine.rb', line 11
def to_bin
@native_pubKey.encoded
end
|