Class Protos.ScryptParameters.Builder

  • All Implemented Interfaces:
    com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, java.lang.Cloneable, Protos.ScryptParametersOrBuilder
    Enclosing class:
    Protos.ScryptParameters

    public static final class Protos.ScryptParameters.Builder
    extends com.google.protobuf.GeneratedMessageLite.Builder<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
    • Field Summary

      • Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder

        instance
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Protos.ScryptParameters.Builder clearN()
      CPU/ memory cost parameter
      Protos.ScryptParameters.Builder clearP()
      Parallelisation parameter
      Protos.ScryptParameters.Builder clearR()
      Block size parameter
      Protos.ScryptParameters.Builder clearSalt()
      Salt to use in generation of the wallet password (8 bytes)
      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)
      Protos.ScryptParameters.Builder setN​(long value)
      CPU/ memory cost parameter
      Protos.ScryptParameters.Builder setP​(int value)
      Parallelisation parameter
      Protos.ScryptParameters.Builder setR​(int value)
      Block size parameter
      Protos.ScryptParameters.Builder setSalt​(com.google.protobuf.ByteString value)
      Salt to use in generation of the wallet password (8 bytes)
      • Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder

        build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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.
      • setSalt

        public Protos.ScryptParameters.Builder setSalt​(com.google.protobuf.ByteString value)
         Salt to use in generation of the wallet password (8 bytes)
         
        required bytes salt = 1;
        Parameters:
        value - The salt to set.
        Returns:
        This builder for chaining.
      • clearSalt

        public Protos.ScryptParameters.Builder clearSalt()
         Salt to use in generation of the wallet password (8 bytes)
         
        required bytes salt = 1;
        Returns:
        This builder for chaining.
      • 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.
      • setN

        public Protos.ScryptParameters.Builder setN​(long value)
         CPU/ memory cost parameter
         
        optional int64 n = 2 [default = 16384];
        Parameters:
        value - The n to set.
        Returns:
        This builder for chaining.
      • clearN

        public Protos.ScryptParameters.Builder clearN()
         CPU/ memory cost parameter
         
        optional int64 n = 2 [default = 16384];
        Returns:
        This builder for chaining.
      • 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.
      • setR

        public Protos.ScryptParameters.Builder setR​(int value)
         Block size parameter
         
        optional int32 r = 3 [default = 8];
        Parameters:
        value - The r to set.
        Returns:
        This builder for chaining.
      • 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.
      • setP

        public Protos.ScryptParameters.Builder setP​(int value)
         Parallelisation parameter
         
        optional int32 p = 4 [default = 1];
        Parameters:
        value - The p to set.
        Returns:
        This builder for chaining.
      • clearP

        public Protos.ScryptParameters.Builder clearP()
         Parallelisation parameter
         
        optional int32 p = 4 [default = 1];
        Returns:
        This builder for chaining.