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-factorsProtobuf type
wallet.ScryptParameters
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
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 Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageLite
memoizedSerializedSize, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionprotected final Object
dynamicMethod
(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) static Protos.ScryptParameters
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)newBuilder
(Protos.ScryptParameters prototype) static Protos.ScryptParameters
parseDelimitedFrom
(InputStream input) static Protos.ScryptParameters
parseDelimitedFrom
(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
(InputStream input) static Protos.ScryptParameters
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Protos.ScryptParameters
parseFrom
(ByteBuffer data) static Protos.ScryptParameters
parseFrom
(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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
SALT_FIELD_NUMBER
public static final int SALT_FIELD_NUMBER- See Also:
-
N_FIELD_NUMBER
public static final int N_FIELD_NUMBER- See Also:
-
R_FIELD_NUMBER
public static final int R_FIELD_NUMBER- See Also:
-
P_FIELD_NUMBER
public static final int P_FIELD_NUMBER- See Also:
-
-
Method Details
-
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(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protos.ScryptParameters parseFrom(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
- Throws:
IOException
-
parseFrom
public static Protos.ScryptParameters parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Protos.ScryptParameters parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static Protos.ScryptParameters parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static Protos.ScryptParameters parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethod
in classcom.google.protobuf.GeneratedMessageLite<Protos.ScryptParameters,
Protos.ScryptParameters.Builder>
-
getDefaultInstance
-
parser
-