Class 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 type wallet.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
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • 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  
      • Fields inherited from class com.google.protobuf.GeneratedMessageLite

        unknownFields
      • Fields inherited from class com.google.protobuf.AbstractMessageLite

        memoizedHashCode
    • 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 parameter
      int getP()
      Parallelisation parameter
      int getR()
      Block size parameter
      com.google.protobuf.ByteString getSalt()
      Salt to use in generation of the wallet password (8 bytes)
      boolean hasN()
      CPU/ memory cost parameter
      boolean hasP()
      Parallelisation parameter
      boolean hasR()
      Block size parameter
      boolean 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
      • 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
    • 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 interface Protos.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 interface Protos.ScryptParametersOrBuilder
        Returns:
        The salt.
      • hasN

        public boolean hasN()
         CPU/ memory cost parameter
         
        optional int64 n = 2 [default = 16384];
        Specified by:
        hasN in interface Protos.ScryptParametersOrBuilder
        Returns:
        Whether the n field is set.
      • hasR

        public boolean hasR()
         Block size parameter
         
        optional int32 r = 3 [default = 8];
        Specified by:
        hasR in interface Protos.ScryptParametersOrBuilder
        Returns:
        Whether the r field is set.
      • hasP

        public boolean hasP()
         Parallelisation parameter
         
        optional int32 p = 4 [default = 1];
        Specified by:
        hasP in interface Protos.ScryptParametersOrBuilder
        Returns:
        Whether the p field is set.
      • 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
      • 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 class com.google.protobuf.GeneratedMessageLite<Protos.ScryptParameters,​Protos.ScryptParameters.Builder>