.class final Lcom/google/common/hash/MacHashFunction$MacHasher; .super Lcom/google/common/hash/AbstractByteHasher; .source "MacHashFunction.java" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lcom/google/common/hash/MacHashFunction; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "MacHasher" .end annotation # instance fields .field private done:Z .field private final mac:Ljavax/crypto/Mac; # direct methods .method private constructor (Ljavax/crypto/Mac;)V .locals 0 .line 2 invoke-direct {p0}, Lcom/google/common/hash/AbstractByteHasher;->()V .line 3 iput-object p1, p0, Lcom/google/common/hash/MacHashFunction$MacHasher;->mac:Ljavax/crypto/Mac; return-void .end method .method public synthetic constructor (Ljavax/crypto/Mac;Lcom/google/common/hash/MacHashFunction$1;)V .locals 0 .line 1 invoke-direct {p0, p1}, Lcom/google/common/hash/MacHashFunction$MacHasher;->(Ljavax/crypto/Mac;)V return-void .end method .method private checkNotDone()V .locals 2 .line 1 iget-boolean v0, p0, Lcom/google/common/hash/MacHashFunction$MacHasher;->done:Z xor-int/lit8 v0, v0, 0x1 const-string v1, "Cannot re-use a Hasher after calling hash() on it" invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->checkState(ZLjava/lang/Object;)V return-void .end method # virtual methods .method public hash()Lcom/google/common/hash/HashCode; .locals 1 .line 1 invoke-direct {p0}, Lcom/google/common/hash/MacHashFunction$MacHasher;->checkNotDone()V const/4 v0, 0x1 .line 2 iput-boolean v0, p0, Lcom/google/common/hash/MacHashFunction$MacHasher;->done:Z .line 3 iget-object v0, p0, Lcom/google/common/hash/MacHashFunction$MacHasher;->mac:Ljavax/crypto/Mac; invoke-virtual {v0}, Ljavax/crypto/Mac;->doFinal()[B move-result-object v0 invoke-static {v0}, Lcom/google/common/hash/HashCode;->fromBytesNoCopy([B)Lcom/google/common/hash/HashCode; move-result-object v0 return-object v0 .end method .method public update(B)V .locals 1 .line 1 invoke-direct {p0}, Lcom/google/common/hash/MacHashFunction$MacHasher;->checkNotDone()V .line 2 iget-object v0, p0, Lcom/google/common/hash/MacHashFunction$MacHasher;->mac:Ljavax/crypto/Mac; invoke-virtual {v0, p1}, Ljavax/crypto/Mac;->update(B)V return-void .end method .method public update(Ljava/nio/ByteBuffer;)V .locals 1 .line 7 invoke-direct {p0}, Lcom/google/common/hash/MacHashFunction$MacHasher;->checkNotDone()V .line 8 invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .line 9 iget-object v0, p0, Lcom/google/common/hash/MacHashFunction$MacHasher;->mac:Ljavax/crypto/Mac; invoke-virtual {v0, p1}, Ljavax/crypto/Mac;->update(Ljava/nio/ByteBuffer;)V return-void .end method .method public update([B)V .locals 1 .line 3 invoke-direct {p0}, Lcom/google/common/hash/MacHashFunction$MacHasher;->checkNotDone()V .line 4 iget-object v0, p0, Lcom/google/common/hash/MacHashFunction$MacHasher;->mac:Ljavax/crypto/Mac; invoke-virtual {v0, p1}, Ljavax/crypto/Mac;->update([B)V return-void .end method .method public update([BII)V .locals 1 .line 5 invoke-direct {p0}, Lcom/google/common/hash/MacHashFunction$MacHasher;->checkNotDone()V .line 6 iget-object v0, p0, Lcom/google/common/hash/MacHashFunction$MacHasher;->mac:Ljavax/crypto/Mac; invoke-virtual {v0, p1, p2, p3}, Ljavax/crypto/Mac;->update([BII)V return-void .end method