AsymmetricHybridCipher.smali
.class public abstract Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;
.super Lorg/spongycastle/pqc/jcajce/provider/util/CipherSpiExt;
.source "AsymmetricHybridCipher.java"
# instance fields
.field protected paramSpec:Ljava/security/spec/AlgorithmParameterSpec;
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 20
invoke-direct {p0}, Lorg/spongycastle/pqc/jcajce/provider/util/CipherSpiExt;-><init>()V
return-void
.end method
# virtual methods
.method public abstract decryptOutputSize(I)I
.end method
.method public final doFinal([BII[BI)I
.registers 9
.prologue
.line 336
array-length v0, p4
invoke-virtual {p0, p3}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->getOutputSize(I)I
move-result v1
if-ge v0, v1, :cond_f
.line 338
new-instance v0, Ljavax/crypto/ShortBufferException;
const-string v1, "Output buffer too short."
invoke-direct {v0, v1}, Ljavax/crypto/ShortBufferException;-><init>(Ljava/lang/String;)V
throw v0
.line 340
:cond_f
invoke-virtual {p0, p1, p2, p3}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->doFinal([BII)[B
move-result-object v0
.line 341
const/4 v1, 0x0
array-length v2, v0
invoke-static {v0, v1, p4, p5, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 342
array-length v0, v0
return v0
.end method
.method public abstract doFinal([BII)[B
.end method
.method public abstract encryptOutputSize(I)I
.end method
.method public final getBlockSize()I
.registers 2
.prologue
.line 64
const/4 v0, 0x0
return v0
.end method
.method public final getIV()[B
.registers 2
.prologue
.line 56
const/4 v0, 0x0
return-object v0
.end method
.method public final getOutputSize(I)I
.registers 4
.prologue
.line 99
iget v0, p0, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->opMode:I
const/4 v1, 0x1
if-ne v0, v1, :cond_a
invoke-virtual {p0, p1}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->encryptOutputSize(I)I
move-result v0
.line 100
:goto_9
return v0
:cond_a
invoke-virtual {p0, p1}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->decryptOutputSize(I)I
move-result v0
goto :goto_9
.end method
.method public final getParameters()Ljava/security/spec/AlgorithmParameterSpec;
.registers 2
.prologue
.line 82
iget-object v0, p0, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->paramSpec:Ljava/security/spec/AlgorithmParameterSpec;
return-object v0
.end method
.method public abstract initCipherDecrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V
.end method
.method public abstract initCipherEncrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
.end method
.method public final initDecrypt(Ljava/security/Key;)V
.registers 4
.prologue
.line 234
const/4 v0, 0x0
:try_start_1
invoke-virtual {p0, p1, v0}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->initDecrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V
:try_end_4
.catch Ljava/security/InvalidAlgorithmParameterException; {:try_start_1 .. :try_end_4} :catch_5
.line 240
return-void
.line 238
:catch_5
move-exception v0
new-instance v0, Ljava/security/InvalidParameterException;
const-string v1, "This cipher needs algorithm parameters for initialization (cannot be null)."
invoke-direct {v0, v1}, Ljava/security/InvalidParameterException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final initDecrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V
.registers 4
.prologue
.line 265
const/4 v0, 0x2
iput v0, p0, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->opMode:I
.line 266
invoke-virtual {p0, p1, p2}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->initCipherDecrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V
.line 267
return-void
.end method
.method public final initEncrypt(Ljava/security/Key;)V
.registers 4
.prologue
.line 125
const/4 v0, 0x0
:try_start_1
new-instance v1, Ljava/security/SecureRandom;
invoke-direct {v1}, Ljava/security/SecureRandom;-><init>()V
invoke-virtual {p0, p1, v0, v1}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->initEncrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
:try_end_9
.catch Ljava/security/InvalidAlgorithmParameterException; {:try_start_1 .. :try_end_9} :catch_a
.line 131
return-void
.line 129
:catch_a
move-exception v0
new-instance v0, Ljava/security/InvalidParameterException;
const-string v1, "This cipher needs algorithm parameters for initialization (cannot be null)."
invoke-direct {v0, v1}, Ljava/security/InvalidParameterException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final initEncrypt(Ljava/security/Key;Ljava/security/SecureRandom;)V
.registers 5
.prologue
.line 157
const/4 v0, 0x0
:try_start_1
invoke-virtual {p0, p1, v0, p2}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->initEncrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
:try_end_4
.catch Ljava/security/InvalidAlgorithmParameterException; {:try_start_1 .. :try_end_4} :catch_5
.line 163
return-void
.line 161
:catch_5
move-exception v0
new-instance v0, Ljava/security/InvalidParameterException;
const-string v1, "This cipher needs algorithm parameters for initialization (cannot be null)."
invoke-direct {v0, v1}, Ljava/security/InvalidParameterException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final initEncrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V
.registers 4
.prologue
.line 182
new-instance v0, Ljava/security/SecureRandom;
invoke-direct {v0}, Ljava/security/SecureRandom;-><init>()V
invoke-virtual {p0, p1, p2, v0}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->initEncrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
.line 183
return-void
.end method
.method public final initEncrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
.registers 5
.prologue
.line 210
const/4 v0, 0x1
iput v0, p0, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->opMode:I
.line 211
invoke-virtual {p0, p1, p2, p3}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->initCipherEncrypt(Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
.line 212
return-void
.end method
.method protected final setMode(Ljava/lang/String;)V
.registers 2
.prologue
.line 38
return-void
.end method
.method protected final setPadding(Ljava/lang/String;)V
.registers 2
.prologue
.line 49
return-void
.end method
.method public final update([BII[BI)I
.registers 9
.prologue
.line 296
array-length v0, p4
invoke-virtual {p0, p3}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->getOutputSize(I)I
move-result v1
if-ge v0, v1, :cond_f
.line 298
new-instance v0, Ljavax/crypto/ShortBufferException;
const-string v1, "output"
invoke-direct {v0, v1}, Ljavax/crypto/ShortBufferException;-><init>(Ljava/lang/String;)V
throw v0
.line 300
:cond_f
invoke-virtual {p0, p1, p2, p3}, Lorg/spongycastle/pqc/jcajce/provider/util/AsymmetricHybridCipher;->update([BII)[B
move-result-object v0
.line 301
const/4 v1, 0x0
array-length v2, v0
invoke-static {v0, v1, p4, p5, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 302
array-length v0, v0
return v0
.end method
.method public abstract update([BII)[B
.end method