use of com.google.crypto.tink.subtle.AesSiv in project tink by google.
the class AesSivKeyManager method getPrimitive.
/**
* @param key {@code AesSivKey} proto
*/
@Override
public DeterministicAead getPrimitive(MessageLite key) throws GeneralSecurityException {
if (!(key instanceof AesSivKey)) {
throw new GeneralSecurityException("expected AesSivKey proto");
}
AesSivKey keyProto = (AesSivKey) key;
validate(keyProto);
return new AesSiv(keyProto.getKeyValue().toByteArray());
}
Aggregations