public class CryptoUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CryptoUtils.HadoopKeyProviderFactory |
Constructor and Description |
---|
CryptoUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
clearCounter(byte[] iv)
Clear the counter part of the IV.
|
static KeyProvider |
getKeyProvider(Configuration conf,
Random random)
Create a KeyProvider.
|
static Consumer<byte[]> |
modifyIvForStream(int columnId,
OrcProto.Stream.Kind kind,
long stripeId)
Update the unique IV for each stream within a single key.
|
static Consumer<byte[]> |
modifyIvForStream(StreamName name,
long stripeId)
Update the unique IV for each stream within a single key.
|
static Consumer<byte[]> |
modifyIvForStripe(long stripeId)
Modify the IV for the given stripe id and make sure the low bytes are
set to 0.
|
public static Consumer<byte[]> modifyIvForStream(StreamName name, long stripeId)
name
- the stream namestripeId
- the stripe idpublic static Consumer<byte[]> modifyIvForStream(int columnId, OrcProto.Stream.Kind kind, long stripeId)
columnId
- the column idkind
- the stream kindstripeId
- the stripe idpublic static Consumer<byte[]> modifyIvForStripe(long stripeId)
stripeId
- the stripe idpublic static void clearCounter(byte[] iv)
iv
- the IV to modifypublic static KeyProvider getKeyProvider(Configuration conf, Random random) throws IOException
random
- the random generator to useIOException
Copyright © 2013–2023 The Apache Software Foundation. All rights reserved.