diff options
author | David Hook <dgh@cryptoworkshop.com> | 2013-05-29 23:58:34 +0400 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2013-05-29 23:58:34 +0400 |
commit | aadacbcf58e9e49add08aed9a22f4698f96b6339 (patch) | |
tree | 46ce28d4b7bc6ac594ea4ed8fed6fe45e479916b | |
parent | 7024732a35ba0fd7e4ef9e3a9ff926a5127622d8 (diff) |
clean up
-rw-r--r-- | src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/SignatureSpi.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/SignatureSpi.java b/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/SignatureSpi.java index fc3a8bb7..29c50f4f 100644 --- a/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/SignatureSpi.java +++ b/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/SignatureSpi.java @@ -8,9 +8,9 @@ import java.security.PublicKey; import org.bouncycastle.asn1.ASN1EncodableVector; import org.bouncycastle.asn1.ASN1Encoding; +import org.bouncycastle.asn1.ASN1Integer; import org.bouncycastle.asn1.ASN1Primitive; import org.bouncycastle.asn1.ASN1Sequence; -import org.bouncycastle.asn1.DERInteger; import org.bouncycastle.asn1.DERSequence; import org.bouncycastle.crypto.CipherParameters; import org.bouncycastle.crypto.DSA; @@ -227,8 +227,8 @@ public class SignatureSpi { ASN1EncodableVector v = new ASN1EncodableVector(); - v.add(new DERInteger(r)); - v.add(new DERInteger(s)); + v.add(new ASN1Integer(r)); + v.add(new ASN1Integer(s)); return new DERSequence(v).getEncoded(ASN1Encoding.DER); } @@ -240,8 +240,8 @@ public class SignatureSpi ASN1Sequence s = (ASN1Sequence)ASN1Primitive.fromByteArray(encoding); BigInteger[] sig = new BigInteger[2]; - sig[0] = ((DERInteger)s.getObjectAt(0)).getValue(); - sig[1] = ((DERInteger)s.getObjectAt(1)).getValue(); + sig[0] = ASN1Integer.getInstance(s.getObjectAt(0)).getValue(); + sig[1] = ASN1Integer.getInstance(s.getObjectAt(1)).getValue(); return sig; } |