DESUtil.smali
.class public Lorg/spongycastle/jcajce/provider/asymmetric/util/DESUtil;
.super Ljava/lang/Object;
.source "DESUtil.java"
# static fields
.field private static final des:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 2
.prologue
.line 12
new-instance v0, Ljava/util/HashSet;
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
.line 16
sput-object v0, Lorg/spongycastle/jcajce/provider/asymmetric/util/DESUtil;->des:Ljava/util/Set;
const-string v1, "DES"
invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 17
sget-object v0, Lorg/spongycastle/jcajce/provider/asymmetric/util/DESUtil;->des:Ljava/util/Set;
const-string v1, "DESEDE"
invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 18
sget-object v0, Lorg/spongycastle/jcajce/provider/asymmetric/util/DESUtil;->des:Ljava/util/Set;
sget-object v1, Lorg/spongycastle/asn1/oiw/OIWObjectIdentifiers;->desCBC:Lorg/spongycastle/asn1/ASN1ObjectIdentifier;
invoke-virtual {v1}, Lorg/spongycastle/asn1/ASN1ObjectIdentifier;->getId()Ljava/lang/String;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 19
sget-object v0, Lorg/spongycastle/jcajce/provider/asymmetric/util/DESUtil;->des:Ljava/util/Set;
sget-object v1, Lorg/spongycastle/asn1/pkcs/PKCSObjectIdentifiers;->des_EDE3_CBC:Lorg/spongycastle/asn1/ASN1ObjectIdentifier;
invoke-virtual {v1}, Lorg/spongycastle/asn1/ASN1ObjectIdentifier;->getId()Ljava/lang/String;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 20
sget-object v0, Lorg/spongycastle/jcajce/provider/asymmetric/util/DESUtil;->des:Ljava/util/Set;
sget-object v1, Lorg/spongycastle/asn1/pkcs/PKCSObjectIdentifiers;->des_EDE3_CBC:Lorg/spongycastle/asn1/ASN1ObjectIdentifier;
invoke-virtual {v1}, Lorg/spongycastle/asn1/ASN1ObjectIdentifier;->getId()Ljava/lang/String;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 21
sget-object v0, Lorg/spongycastle/jcajce/provider/asymmetric/util/DESUtil;->des:Ljava/util/Set;
sget-object v1, Lorg/spongycastle/asn1/pkcs/PKCSObjectIdentifiers;->id_alg_CMS3DESwrap:Lorg/spongycastle/asn1/ASN1ObjectIdentifier;
invoke-virtual {v1}, Lorg/spongycastle/asn1/ASN1ObjectIdentifier;->getId()Ljava/lang/String;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 22
return-void
.end method
.method public constructor <init>()V
.registers 1
.prologue
.line 10
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static isDES(Ljava/lang/String;)Z
.registers 3
.prologue
.line 26
invoke-static {p0}, Lorg/spongycastle/util/Strings;->toUpperCase(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 28
sget-object v1, Lorg/spongycastle/jcajce/provider/asymmetric/util/DESUtil;->des:Ljava/util/Set;
invoke-interface {v1, v0}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v0
return v0
.end method
.method public static setOddParity([B)V
.registers 6
.prologue
.line 40
const/4 v0, 0x0
:goto_1
array-length v1, p0
if-ge v0, v1, :cond_27
.line 42
aget-byte v1, p0, v0
.line 43
and-int/lit16 v2, v1, 0xfe
shr-int/lit8 v3, v1, 0x1
shr-int/lit8 v4, v1, 0x2
xor-int/2addr v3, v4
shr-int/lit8 v4, v1, 0x3
xor-int/2addr v3, v4
shr-int/lit8 v4, v1, 0x4
xor-int/2addr v3, v4
shr-int/lit8 v4, v1, 0x5
xor-int/2addr v3, v4
shr-int/lit8 v4, v1, 0x6
xor-int/2addr v3, v4
shr-int/lit8 v1, v1, 0x7
xor-int/2addr v1, v3
xor-int/lit8 v1, v1, 0x1
and-int/lit8 v1, v1, 0x1
or-int/2addr v1, v2
int-to-byte v1, v1
aput-byte v1, p0, v0
.line 40
add-int/lit8 v0, v0, 0x1
goto :goto_1
.line 52
:cond_27
return-void
.end method