X9IntegerConverter.smali
.class public Lorg/spongycastle/asn1/x9/X9IntegerConverter;
.super Ljava/lang/Object;
.source "X9IntegerConverter.java"
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 8
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public getByteLength(Lorg/spongycastle/math/ec/ECCurve;)I
.registers 3
.prologue
.line 13
invoke-virtual {p1}, Lorg/spongycastle/math/ec/ECCurve;->getFieldSize()I
move-result v0
add-int/lit8 v0, v0, 0x7
div-int/lit8 v0, v0, 0x8
return v0
.end method
.method public getByteLength(Lorg/spongycastle/math/ec/ECFieldElement;)I
.registers 3
.prologue
.line 19
invoke-virtual {p1}, Lorg/spongycastle/math/ec/ECFieldElement;->getFieldSize()I
move-result v0
add-int/lit8 v0, v0, 0x7
div-int/lit8 v0, v0, 0x8
return v0
.end method
.method public integerToBytes(Ljava/math/BigInteger;I)[B
.registers 8
.prologue
const/4 v4, 0x0
.line 26
invoke-virtual {p1}, Ljava/math/BigInteger;->toByteArray()[B
move-result-object v1
.line 28
array-length v0, v1
if-ge p2, v0, :cond_10
.line 30
new-array v0, p2, [B
.line 32
array-length v2, v1
sub-int/2addr v2, p2
invoke-static {v1, v2, v0, v4, p2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 45
:goto_f
return-object v0
.line 36
:cond_10
array-length v0, v1
if-le p2, v0, :cond_1d
.line 38
new-array v0, p2, [B
.line 40
array-length v2, v1
sub-int v2, p2, v2
array-length v3, v1
invoke-static {v1, v4, v0, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
goto :goto_f
:cond_1d
move-object v0, v1
.line 45
goto :goto_f
.end method