- java.lang.Object
-
- org.cryptomator.cryptolib.common.MacSupplier
-
public final class MacSupplier extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static MacSupplierHMAC_SHA256
-
Constructor Summary
Constructors Constructor Description MacSupplier(String macAlgorithm)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ObjectPool.Lease<Mac>keyed(SecretKey key)Leases a reusable MAC object initialized with the given key.MacwithKey(SecretKey key)Deprecated.Usekeyed(SecretKey)instead
-
-
-
Field Detail
-
HMAC_SHA256
public static final MacSupplier HMAC_SHA256
-
-
Constructor Detail
-
MacSupplier
public MacSupplier(String macAlgorithm)
-
-
Method Detail
-
keyed
public ObjectPool.Lease<Mac> keyed(SecretKey key)
Leases a reusable MAC object initialized with the given key.- Parameters:
key- Key to use in keyed MAC- Returns:
- A lease supplying a refurbished MAC
-
withKey
@Deprecated public Mac withKey(SecretKey key)
Deprecated.Usekeyed(SecretKey)insteadCreates a new MAC- Parameters:
key- Key to use in keyed MAC- Returns:
- New Mac instance
-
-