Package org.bitcoinj.wallet
Class Protos.ScryptParameters
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite<Protos.ScryptParameters,Protos.ScryptParameters.Builder>
-
- org.bitcoinj.wallet.Protos.ScryptParameters
-
- All Implemented Interfaces:
com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,Protos.ScryptParametersOrBuilder
- Enclosing class:
- Protos
public static final class Protos.ScryptParameters extends com.google.protobuf.GeneratedMessageLite<Protos.ScryptParameters,Protos.ScryptParameters.Builder> implements Protos.ScryptParametersOrBuilder
The parameters used in the scrypt key derivation function. The default values are taken from http://www.tarsnap.com/scrypt/scrypt-slides.pdf. They can be increased - n is the number of iterations performed and r and p can be used to tweak the algorithm - see: http://stackoverflow.com/questions/11126315/what-are-optimal-scrypt-work-factors
Protobuf typewallet.ScryptParameters
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Protos.ScryptParameters.Builder
The parameters used in the scrypt key derivation function.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type extends java.lang.Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm
-
-
Field Summary
Fields Modifier and Type Field Description static int
N_FIELD_NUMBER
static int
P_FIELD_NUMBER
static int
R_FIELD_NUMBER
static int
SALT_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)
static Protos.ScryptParameters
getDefaultInstance()
long
getN()
CPU/ memory cost parameterint
getP()
Parallelisation parameterint
getR()
Block size parametercom.google.protobuf.ByteString
getSalt()
Salt to use in generation of the wallet password (8 bytes)boolean
hasN()
CPU/ memory cost parameterboolean
hasP()
Parallelisation parameterboolean
hasR()
Block size parameterboolean
hasSalt()
Salt to use in generation of the wallet password (8 bytes)static Protos.ScryptParameters.Builder
newBuilder()
static Protos.ScryptParameters.Builder
newBuilder(Protos.ScryptParameters prototype)
static Protos.ScryptParameters
parseDelimitedFrom(java.io.InputStream input)
static Protos.ScryptParameters
parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protos.ScryptParameters
parseFrom(byte[] data)
static Protos.ScryptParameters
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protos.ScryptParameters
parseFrom(com.google.protobuf.ByteString data)
static Protos.ScryptParameters
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protos.ScryptParameters
parseFrom(com.google.protobuf.CodedInputStream input)
static Protos.ScryptParameters
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protos.ScryptParameters
parseFrom(java.io.InputStream input)
static Protos.ScryptParameters
parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protos.ScryptParameters
parseFrom(java.nio.ByteBuffer data)
static Protos.ScryptParameters
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Protos.ScryptParameters>
parser()
-
Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
-
-
-
Field Detail
-
SALT_FIELD_NUMBER
public static final int SALT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
N_FIELD_NUMBER
public static final int N_FIELD_NUMBER
- See Also:
- Constant Field Values
-
R_FIELD_NUMBER
public static final int R_FIELD_NUMBER
- See Also:
- Constant Field Values
-
P_FIELD_NUMBER
public static final int P_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasSalt
public boolean hasSalt()
Salt to use in generation of the wallet password (8 bytes)
required bytes salt = 1;
- Specified by:
hasSalt
in interfaceProtos.ScryptParametersOrBuilder
- Returns:
- Whether the salt field is set.
-
getSalt
public com.google.protobuf.ByteString getSalt()
Salt to use in generation of the wallet password (8 bytes)
required bytes salt = 1;
- Specified by:
getSalt
in interfaceProtos.ScryptParametersOrBuilder
- Returns:
- The salt.
-
hasN
public boolean hasN()
CPU/ memory cost parameter
optional int64 n = 2 [default = 16384];
- Specified by:
hasN
in interfaceProtos.ScryptParametersOrBuilder
- Returns:
- Whether the n field is set.
-
getN
public long getN()
CPU/ memory cost parameter
optional int64 n = 2 [default = 16384];
- Specified by:
getN
in interfaceProtos.ScryptParametersOrBuilder
- Returns:
- The n.
-
hasR
public boolean hasR()
Block size parameter
optional int32 r = 3 [default = 8];
- Specified by:
hasR
in interfaceProtos.ScryptParametersOrBuilder
- Returns:
- Whether the r field is set.
-
getR
public int getR()
Block size parameter
optional int32 r = 3 [default = 8];
- Specified by:
getR
in interfaceProtos.ScryptParametersOrBuilder
- Returns:
- The r.
-
hasP
public boolean hasP()
Parallelisation parameter
optional int32 p = 4 [default = 1];
- Specified by:
hasP
in interfaceProtos.ScryptParametersOrBuilder
- Returns:
- Whether the p field is set.
-
getP
public int getP()
Parallelisation parameter
optional int32 p = 4 [default = 1];
- Specified by:
getP
in interfaceProtos.ScryptParametersOrBuilder
- Returns:
- The p.
-
parseFrom
public static Protos.ScryptParameters parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protos.ScryptParameters parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protos.ScryptParameters parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protos.ScryptParameters parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protos.ScryptParameters parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protos.ScryptParameters parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protos.ScryptParameters parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protos.ScryptParameters parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Protos.ScryptParameters parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Protos.ScryptParameters parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protos.ScryptParameters parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protos.ScryptParameters parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilder
public static Protos.ScryptParameters.Builder newBuilder()
-
newBuilder
public static Protos.ScryptParameters.Builder newBuilder(Protos.ScryptParameters prototype)
-
dynamicMethod
protected final java.lang.Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)
- Specified by:
dynamicMethod
in classcom.google.protobuf.GeneratedMessageLite<Protos.ScryptParameters,Protos.ScryptParameters.Builder>
-
getDefaultInstance
public static Protos.ScryptParameters getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Protos.ScryptParameters> parser()
-
-