Skip to content

adds iv_len setter #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 7 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,40 +61,19 @@ DO NOT MODIFIY - GENERATED CODE
</distributionManagement>
<properties>
<bc.versions>1.65</bc.versions>
<invoker.skip>${maven.test.skip}</invoker.skip>
<invoker.test>${bc.versions}</invoker.test>
<jruby.plugins.version>1.1.8</jruby.plugins.version>
<mavengem.wagon.version>1.0.3</mavengem.wagon.version>
<jruby.switches>-W0</jruby.switches>
<jruby.version>9.1.17.0</jruby.version>
<jruby.versions>9.1.17.0</jruby.versions>
<jruby.plugins.version>1.1.8</jruby.plugins.version>
<invoker.skip>${maven.test.skip}</invoker.skip>
<runit.dir>src/test/ruby/**/test_*.rb</runit.dir>
<mavengem-wagon.version>1.0.3</mavengem-wagon.version>
<mavengem.wagon.version>1.0.3</mavengem.wagon.version>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
<jruby.versions>9.1.17.0</jruby.versions>
<polyglot.dump.readonly>true</polyglot.dump.readonly>
<runit.dir>src/test/ruby/**/test_*.rb</runit.dir>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
<invoker.test>${bc.versions}</invoker.test>
</properties>
<dependencies>
<dependency>
<groupId>rubygems</groupId>
<artifactId>jar-dependencies</artifactId>
<version>[0.1,0.99999]</version>
<type>gem</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>mocha</artifactId>
<version>[1.4,2.0)</version>
<type>gem</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>ruby-maven</artifactId>
<version>[3.0,3.99999]</version>
<type>gem</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/jruby/ext/openssl/Cipher.java
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,12 @@ public final RubyInteger iv_len() {
return getRuntime().newFixnum(ivLength);
}

@JRubyMethod(name = "iv_len=", required = 1)
public final IRubyObject set_iv_len(IRubyObject len) {
this.ivLength = RubyNumeric.fix2int(len);
return len;
}

@JRubyMethod(name = "key_len=", required = 1)
public final IRubyObject set_key_len(IRubyObject len) {
this.keyLength = RubyNumeric.fix2int(len);
Expand Down