Skip to main content
edited tags
Link
Vojtěch Strnad
  • 10.4k
  • 3
  • 14
  • 43
Notice removed Draw attention by CommunityBot
Bounty Ended with no winning answer by CommunityBot
edited body; edited tags; edited title
Source Link
Murch
  • 77.8k
  • 35
  • 190
  • 641

generating Generating bitcoin core -rpcauth argument using gloanggolang

we'reWe're developing a Blockchain deployment solution kotal, and generating -rpcauth argument from the supplied user name and password. The problem is when we try to use the same user and password using curl, it writes ThreadRPCServer incorrect password attempt from 127.0.0.1:55566.

Here's how we're generating -rpcauth from password in golang.

user := "kotal"
password = "s3cr3t"

salt := make([]byte, 16)
rand.Read(salt)

hash := hmac.New(sha256.New, salt)
hash.Write([]byte(password))

rpcauth := fmt.Sprintf("%s:%x$%x", user, salt, hash.Sum(nil))

what'sWhat's wrong with our golang implementation ?

generating bitcoin core -rpcauth argument using gloang

we're developing a Blockchain deployment solution kotal, and generating -rpcauth argument from the supplied user name and password. The problem is when we try to use the same user and password using curl, it writes ThreadRPCServer incorrect password attempt from 127.0.0.1:55566.

Here's how we're generating -rpcauth from password in golang.

user := "kotal"
password = "s3cr3t"

salt := make([]byte, 16)
rand.Read(salt)

hash := hmac.New(sha256.New, salt)
hash.Write([]byte(password))

rpcauth := fmt.Sprintf("%s:%x$%x", user, salt, hash.Sum(nil))

what's wrong with our golang implementation ?

Generating bitcoin core -rpcauth argument using golang

We're developing a Blockchain deployment solution kotal, and generating -rpcauth argument from the supplied user name and password. The problem is when we try to use the same user and password using curl, it writes ThreadRPCServer incorrect password attempt from 127.0.0.1:55566.

Here's how we're generating -rpcauth from password in golang.

user := "kotal"
password = "s3cr3t"

salt := make([]byte, 16)
rand.Read(salt)

hash := hmac.New(sha256.New, salt)
hash.Write([]byte(password))

rpcauth := fmt.Sprintf("%s:%x$%x", user, salt, hash.Sum(nil))

What's wrong with our golang implementation ?

Notice added Draw attention by Farghaly
Bounty Started worth 100 reputation by Farghaly
Source Link
Farghaly
  • 893
  • 7
  • 19

generating bitcoin core -rpcauth argument using gloang

we're developing a Blockchain deployment solution kotal, and generating -rpcauth argument from the supplied user name and password. The problem is when we try to use the same user and password using curl, it writes ThreadRPCServer incorrect password attempt from 127.0.0.1:55566.

Here's how we're generating -rpcauth from password in golang.

user := "kotal"
password = "s3cr3t"

salt := make([]byte, 16)
rand.Read(salt)

hash := hmac.New(sha256.New, salt)
hash.Write([]byte(password))

rpcauth := fmt.Sprintf("%s:%x$%x", user, salt, hash.Sum(nil))

what's wrong with our golang implementation ?