Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfd5076869 | ||
|
|
3f064509b3 | ||
|
|
23774f6467 | ||
|
|
f61622a056 | ||
|
|
54686aabd4 | ||
|
|
307fbd560c | ||
|
|
36e6b228ae | ||
|
|
e81eb6473b | ||
|
|
e98e07ec91 | ||
|
|
8d1441db4b | ||
|
|
5e86107a34 | ||
|
|
af68ad2dd7 | ||
|
|
b3341b58aa | ||
|
|
81ab0b304e | ||
|
|
2de609b735 | ||
|
|
67ee8b7fc0 | ||
|
|
d74f4f4a44 | ||
|
|
8cb3334d95 | ||
|
|
7e9a23df22 | ||
|
|
158b7d8e3c | ||
|
|
a20e296ca7 | ||
|
|
a723c120b9 | ||
|
|
4cedb5a79e | ||
|
|
6a1554bbad | ||
|
|
9a56b2b802 | ||
|
|
374a93370a | ||
|
|
c264cdd0ae | ||
|
|
e11767a490 | ||
|
|
c4f49cd356 | ||
|
|
3b16e9048c | ||
|
|
ee1176c739 | ||
|
|
8e28da0e2a | ||
|
|
3d3cb9341e |
1
.codecov.yml
Normal file
1
.codecov.yml
Normal file
@@ -0,0 +1 @@
|
||||
comment: off
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
*.swp
|
||||
|
||||
multibase-conv/multibase-conv
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.2.1: QmUq3H9YpcPphbRj6ct6rBgBE377A8wANP8zPMRqe1WYbf
|
||||
0.2.6: QmexBtiTTEwwn42Yi6ouKt6VqzpA6wjJgiW1oh9VfaRrup
|
||||
|
||||
25
.travis.yml
Normal file
25
.travis.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
os:
|
||||
- linux
|
||||
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.8.3
|
||||
|
||||
install:
|
||||
- go get -u github.com/whyrusleeping/gx
|
||||
- go get -u github.com/whyrusleeping/gx-go
|
||||
- gx install
|
||||
|
||||
|
||||
script:
|
||||
- gx-go rewrite
|
||||
- go test -race -coverprofile=unittest.coverprofile -covermode=atomic .
|
||||
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash) -f unittest.coverprofile -F unittest
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $GOPATH/src/gx
|
||||
31
README.md
31
README.md
@@ -1,21 +1,42 @@
|
||||
# go-multibase
|
||||
|
||||
[](http://ipn.io)
|
||||
[](http://webchat.freenode.net/?channels=%23ipfs)
|
||||
[](https://github.com/multiformats/multiformats)
|
||||
[](https://webchat.freenode.net/?channels=%23ipfs)
|
||||
[](https://github.com/RichardLitt/standard-readme)
|
||||
[](https://travis-ci.org/multiformats/go-multibase)
|
||||
[](https://codecov.io/github/multiformats/go-multibase?branch=master)
|
||||
|
||||
> Implementation of [multibase](https://github.com/multiformats/multibase) -self identifying base encodings- in Go.
|
||||
|
||||
> Go implementation of the [multibase](https://github.com/multiformats/multibase) specification.
|
||||
|
||||
## Install
|
||||
|
||||
`go-multibase` is a standard Go module which can be installed with:
|
||||
|
||||
```sh
|
||||
go get github.com/multiformats/go-multibase
|
||||
```
|
||||
|
||||
Note that `go-multibase` is packaged with Gx, so it is recommended to use Gx to install and use it (see Usage section).
|
||||
|
||||
## Usage
|
||||
|
||||
TODO
|
||||
This module is packaged with [Gx](https://github.com/whyrusleeping/gx). In order to use it in your own project it is recommended that you:
|
||||
|
||||
## Maintainer
|
||||
```sh
|
||||
go get -u github.com/whyrusleeping/gx
|
||||
go get -u github.com/whyrusleeping/gx-go
|
||||
cd <your-project-repository>
|
||||
gx init
|
||||
gx import github.com/multiformats/go-multibase
|
||||
gx install --global
|
||||
gx-go --rewrite
|
||||
```
|
||||
|
||||
Please check [Gx](https://github.com/whyrusleeping/gx) and [Gx-go](https://github.com/whyrusleeping/gx-go) documentation for more information.
|
||||
|
||||
## Maintainers
|
||||
|
||||
Captain: [@whyrusleeping](https://github.com/whyrusleeping).
|
||||
|
||||
@@ -29,4 +50,4 @@ Small note: If editing the README, please conform to the [standard-readme](https
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE) © Protocol Labs Inc.
|
||||
[MIT](LICENSE) © 2016 Protocol Labs Inc.
|
||||
|
||||
21
base16.go
Normal file
21
base16.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package multibase
|
||||
|
||||
func hexEncodeToStringUpper(src []byte) string {
|
||||
dst := make([]byte, len(src)*2)
|
||||
hexEncodeUpper(dst, src)
|
||||
return string(dst)
|
||||
}
|
||||
|
||||
var hextableUpper = [16]byte{
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
'A', 'B', 'C', 'D', 'E', 'F',
|
||||
}
|
||||
|
||||
func hexEncodeUpper(dst, src []byte) int {
|
||||
for i, v := range src {
|
||||
dst[i*2] = hextableUpper[v>>4]
|
||||
dst[i*2+1] = hextableUpper[v&0x0f]
|
||||
}
|
||||
|
||||
return len(src) * 2
|
||||
}
|
||||
17
base32.go
Normal file
17
base32.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package multibase
|
||||
|
||||
import (
|
||||
b32 "github.com/whyrusleeping/base32"
|
||||
)
|
||||
|
||||
var base32StdLowerPad = b32.NewEncodingCI("abcdefghijklmnopqrstuvwxyz234567")
|
||||
var base32StdLowerNoPad = base32StdLowerPad.WithPadding(b32.NoPadding)
|
||||
|
||||
var base32StdUpperPad = b32.NewEncodingCI("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567")
|
||||
var base32StdUpperNoPad = base32StdUpperPad.WithPadding(b32.NoPadding)
|
||||
|
||||
var base32HexLowerPad = b32.NewEncodingCI("0123456789abcdefghijklmnopqrstuv")
|
||||
var base32HexLowerNoPad = base32HexLowerPad.WithPadding(b32.NoPadding)
|
||||
|
||||
var base32HexUpperPad = b32.NewEncodingCI("0123456789ABCDEFGHIJKLMNOPQRSTUV")
|
||||
var base32HexUpperNoPad = base32HexUpperPad.WithPadding(b32.NoPadding)
|
||||
41
multibase-conv/main.go
Normal file
41
multibase-conv/main.go
Normal file
@@ -0,0 +1,41 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
multibase "github.com/multiformats/go-multibase"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if len(os.Args) < 3 {
|
||||
fmt.Printf("usage: %s <new-base> <multibase-str>...\n", os.Args[0])
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
var newBase multibase.Encoding
|
||||
if baseParm := os.Args[1]; len(baseParm) != 0 {
|
||||
newBase = multibase.Encoding(baseParm[0])
|
||||
} else {
|
||||
fmt.Fprintln(os.Stderr, "<new-base> is empty")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
input := os.Args[2:]
|
||||
|
||||
for _, strmbase := range input {
|
||||
_, data, err := multibase.Decode(strmbase)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error while decoding: %s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
newCid, err := multibase.Encode(newBase, data)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error while encoding: %s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Println(newCid)
|
||||
}
|
||||
|
||||
}
|
||||
121
multibase.go
121
multibase.go
@@ -1,43 +1,136 @@
|
||||
package multibase
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
|
||||
b58 "github.com/jbenet/go-base58"
|
||||
b58 "github.com/mr-tron/base58/base58"
|
||||
b32 "github.com/whyrusleeping/base32"
|
||||
)
|
||||
|
||||
// Encoding identifies the type of base-encoding that a multibase is carrying.
|
||||
type Encoding int
|
||||
|
||||
// These are the supported encodings
|
||||
const (
|
||||
Base1 = '1'
|
||||
Base2 = '0'
|
||||
Base8 = '7'
|
||||
Base10 = '9'
|
||||
Base16 = 'f'
|
||||
Base58Flickr = 'Z'
|
||||
Base58BTC = 'z'
|
||||
Identity = 0x00
|
||||
Base1 = '1'
|
||||
Base2 = '0'
|
||||
Base8 = '7'
|
||||
Base10 = '9'
|
||||
Base16 = 'f'
|
||||
Base16Upper = 'F'
|
||||
Base32 = 'b'
|
||||
Base32Upper = 'B'
|
||||
Base32pad = 'c'
|
||||
Base32padUpper = 'C'
|
||||
Base32hex = 'v'
|
||||
Base32hexUpper = 'V'
|
||||
Base32hexPad = 't'
|
||||
Base32hexPadUpper = 'T'
|
||||
Base58Flickr = 'Z'
|
||||
Base58BTC = 'z'
|
||||
Base64 = 'm'
|
||||
Base64url = 'u'
|
||||
Base64pad = 'M'
|
||||
Base64urlPad = 'U'
|
||||
)
|
||||
|
||||
// ErrUnsupportedEncoding is returned when the selected encoding is not known or
|
||||
// implemented.
|
||||
var ErrUnsupportedEncoding = fmt.Errorf("selected encoding not supported")
|
||||
|
||||
func Encode(base int, data []byte) (string, error) {
|
||||
// Encode encodes a given byte slice with the selected encoding and returns a
|
||||
// multibase string (<encoding><base-encoded-string>). It will return
|
||||
// an error if the selected base is not known.
|
||||
func Encode(base Encoding, data []byte) (string, error) {
|
||||
switch base {
|
||||
case Base58BTC:
|
||||
return string(Base58BTC) + b58.EncodeAlphabet(data, b58.BTCAlphabet), nil
|
||||
case Identity:
|
||||
// 0x00 inside a string is OK in golang and causes no problems with the length calculation.
|
||||
return string(Identity) + string(data), nil
|
||||
case Base16:
|
||||
return string(Base16) + hex.EncodeToString(data), nil
|
||||
case Base16Upper:
|
||||
return string(Base16Upper) + hexEncodeToStringUpper(data), nil
|
||||
case Base32:
|
||||
return string(Base32) + base32StdLowerNoPad.EncodeToString(data), nil
|
||||
case Base32Upper:
|
||||
return string(Base32Upper) + base32StdUpperNoPad.EncodeToString(data), nil
|
||||
case Base32hex:
|
||||
return string(Base32hex) + base32HexLowerNoPad.EncodeToString(data), nil
|
||||
case Base32hexUpper:
|
||||
return string(Base32hexUpper) + base32HexUpperNoPad.EncodeToString(data), nil
|
||||
case Base32pad:
|
||||
return string(Base32pad) + base32StdLowerPad.EncodeToString(data), nil
|
||||
case Base32padUpper:
|
||||
return string(Base32padUpper) + base32StdUpperPad.EncodeToString(data), nil
|
||||
case Base32hexPad:
|
||||
return string(Base32hexPad) + base32HexLowerPad.EncodeToString(data), nil
|
||||
case Base32hexPadUpper:
|
||||
return string(Base32hexPadUpper) + base32HexUpperPad.EncodeToString(data), nil
|
||||
case Base58BTC:
|
||||
return string(Base58BTC) + b58.EncodeAlphabet(data, b58.BTCAlphabet), nil
|
||||
case Base58Flickr:
|
||||
return string(Base58Flickr) + b58.EncodeAlphabet(data, b58.FlickrAlphabet), nil
|
||||
case Base64pad:
|
||||
return string(Base64pad) + base64.StdEncoding.EncodeToString(data), nil
|
||||
case Base64urlPad:
|
||||
return string(Base64urlPad) + base64.URLEncoding.EncodeToString(data), nil
|
||||
case Base64url:
|
||||
return string(Base64url) + base64.RawURLEncoding.EncodeToString(data), nil
|
||||
case Base64:
|
||||
return string(Base64) + base64.RawStdEncoding.EncodeToString(data), nil
|
||||
default:
|
||||
return "", ErrUnsupportedEncoding
|
||||
}
|
||||
}
|
||||
|
||||
func Decode(data string) (int, []byte, error) {
|
||||
// Decode takes a multibase string and decodes into a bytes buffer.
|
||||
// It will return an error if the selected base is not known.
|
||||
func Decode(data string) (Encoding, []byte, error) {
|
||||
if len(data) == 0 {
|
||||
return 0, nil, fmt.Errorf("cannot decode multibase for zero length string")
|
||||
}
|
||||
|
||||
switch data[0] {
|
||||
enc := Encoding(data[0])
|
||||
|
||||
switch enc {
|
||||
case Identity:
|
||||
return Identity, []byte(data[1:]), nil
|
||||
case Base16, Base16Upper:
|
||||
bytes, err := hex.DecodeString(data[1:])
|
||||
return enc, bytes, err
|
||||
case Base32, Base32Upper:
|
||||
bytes, err := b32.RawStdEncoding.DecodeString(data[1:])
|
||||
return enc, bytes, err
|
||||
case Base32hex, Base32hexUpper:
|
||||
bytes, err := b32.RawHexEncoding.DecodeString(data[1:])
|
||||
return enc, bytes, err
|
||||
case Base32pad, Base32padUpper:
|
||||
bytes, err := b32.StdEncoding.DecodeString(data[1:])
|
||||
return enc, bytes, err
|
||||
case Base32hexPad, Base32hexPadUpper:
|
||||
bytes, err := b32.HexEncoding.DecodeString(data[1:])
|
||||
return enc, bytes, err
|
||||
case Base58BTC:
|
||||
return Base58BTC, b58.DecodeAlphabet(data[1:], b58.BTCAlphabet), nil
|
||||
bytes, err := b58.DecodeAlphabet(data[1:], b58.BTCAlphabet)
|
||||
return Base58BTC, bytes, err
|
||||
case Base58Flickr:
|
||||
bytes, err := b58.DecodeAlphabet(data[1:], b58.FlickrAlphabet)
|
||||
return Base58Flickr, bytes, err
|
||||
case Base64pad:
|
||||
bytes, err := base64.StdEncoding.DecodeString(data[1:])
|
||||
return Base64pad, bytes, err
|
||||
case Base64urlPad:
|
||||
bytes, err := base64.URLEncoding.DecodeString(data[1:])
|
||||
return Base64urlPad, bytes, err
|
||||
case Base64:
|
||||
bytes, err := base64.RawStdEncoding.DecodeString(data[1:])
|
||||
return Base64, bytes, err
|
||||
case Base64url:
|
||||
bytes, err := base64.RawURLEncoding.DecodeString(data[1:])
|
||||
return Base64url, bytes, err
|
||||
default:
|
||||
return -1, nil, ErrUnsupportedEncoding
|
||||
}
|
||||
|
||||
@@ -6,30 +6,139 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBase58RoundTrip(t *testing.T) {
|
||||
buf := make([]byte, 16)
|
||||
var sampleBytes = []byte("Decentralize everything!!!")
|
||||
var encodedSamples = map[Encoding]string{
|
||||
Identity: string(0x00) + "Decentralize everything!!!",
|
||||
Base16: "f446563656e7472616c697a652065766572797468696e67212121",
|
||||
Base16Upper: "F446563656E7472616C697A652065766572797468696E67212121",
|
||||
Base32: "birswgzloorzgc3djpjssazlwmvzhs5dinfxgoijbee",
|
||||
Base32Upper: "BIRSWGZLOORZGC3DJPJSSAZLWMVZHS5DINFXGOIJBEE",
|
||||
Base32pad: "cirswgzloorzgc3djpjssazlwmvzhs5dinfxgoijbee======",
|
||||
Base32padUpper: "CIRSWGZLOORZGC3DJPJSSAZLWMVZHS5DINFXGOIJBEE======",
|
||||
Base32hex: "v8him6pbeehp62r39f9ii0pbmclp7it38d5n6e89144",
|
||||
Base32hexUpper: "V8HIM6PBEEHP62R39F9II0PBMCLP7IT38D5N6E89144",
|
||||
Base32hexPad: "t8him6pbeehp62r39f9ii0pbmclp7it38d5n6e89144======",
|
||||
Base32hexPadUpper: "T8HIM6PBEEHP62R39F9II0PBMCLP7IT38D5N6E89144======",
|
||||
Base58BTC: "z36UQrhJq9fNDS7DiAHM9YXqDHMPfr4EMArvt",
|
||||
Base64pad: "MRGVjZW50cmFsaXplIGV2ZXJ5dGhpbmchISE=",
|
||||
Base64urlPad: "URGVjZW50cmFsaXplIGV2ZXJ5dGhpbmchISE=",
|
||||
}
|
||||
|
||||
func testEncode(t *testing.T, encoding Encoding, bytes []byte, expected string) {
|
||||
actual, err := Encode(encoding, bytes)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
if actual != expected {
|
||||
t.Errorf("encoding failed for %c (%d), expected: %s, got: %s", encoding, encoding, expected, actual)
|
||||
}
|
||||
}
|
||||
|
||||
func testDecode(t *testing.T, expectedEncoding Encoding, expectedBytes []byte, data string) {
|
||||
actualEncoding, actualBytes, err := Decode(data)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
if actualEncoding != expectedEncoding {
|
||||
t.Errorf("wrong encoding code, expected: %c (%d), got %c (%d)", expectedEncoding, expectedEncoding, actualEncoding, actualEncoding)
|
||||
}
|
||||
if !bytes.Equal(actualBytes, expectedBytes) {
|
||||
t.Errorf("decoding failed for %c (%d), expected: %v, got %v", actualEncoding, actualEncoding, expectedBytes, actualBytes)
|
||||
}
|
||||
}
|
||||
|
||||
func TestEncode(t *testing.T) {
|
||||
for encoding, data := range encodedSamples {
|
||||
testEncode(t, encoding, sampleBytes, data)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDecode(t *testing.T) {
|
||||
for encoding, data := range encodedSamples {
|
||||
testDecode(t, encoding, sampleBytes, data)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRoundTrip(t *testing.T) {
|
||||
buf := make([]byte, 17)
|
||||
rand.Read(buf)
|
||||
|
||||
enc, err := Encode(Base58BTC, buf)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
baseList := []Encoding{Identity, Base16, Base32, Base32hex, Base32pad, Base32hexPad, Base58BTC, Base58Flickr, Base64pad, Base64urlPad}
|
||||
|
||||
for _, base := range baseList {
|
||||
enc, err := Encode(base, buf)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
e, out, err := Decode(enc)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if e != base {
|
||||
t.Fatal("got wrong encoding out")
|
||||
}
|
||||
|
||||
if !bytes.Equal(buf, out) {
|
||||
t.Fatal("input wasnt the same as output", buf, out)
|
||||
}
|
||||
}
|
||||
|
||||
e, out, err := Decode(enc)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if e != Base58BTC {
|
||||
t.Fatal("got wrong encoding out")
|
||||
}
|
||||
|
||||
if !bytes.Equal(buf, out) {
|
||||
t.Fatal("input wasnt the same as output", buf, out)
|
||||
}
|
||||
|
||||
_, _, err = Decode("")
|
||||
_, _, err := Decode("")
|
||||
if err == nil {
|
||||
t.Fatal("shouldnt be able to decode empty string")
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkRoundTrip(b *testing.B) {
|
||||
buf := make([]byte, 32)
|
||||
rand.Read(buf)
|
||||
b.ResetTimer()
|
||||
|
||||
bases := map[string]Encoding{
|
||||
"Identity": Identity,
|
||||
"Base16": Base16,
|
||||
"Base16Upper": Base16Upper,
|
||||
"Base32": Base32,
|
||||
"Base32Upper": Base32Upper,
|
||||
"Base32pad": Base32pad,
|
||||
"Base32padUpper": Base32padUpper,
|
||||
"Base32hex": Base32hex,
|
||||
"Base32hexUpper": Base32hexUpper,
|
||||
"Base32hexPad": Base32hexPad,
|
||||
"Base32hexPadUpper": Base32hexPadUpper,
|
||||
"Base58Flickr": Base58Flickr,
|
||||
"Base58BTC": Base58BTC,
|
||||
"Base64": Base64,
|
||||
"Base64url": Base64url,
|
||||
"Base64pad": Base64pad,
|
||||
"Base64urlPad": Base64urlPad,
|
||||
}
|
||||
|
||||
for name, base := range bases {
|
||||
b.Run(name, func(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
enc, err := Encode(base, buf)
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
|
||||
e, out, err := Decode(enc)
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
|
||||
if e != base {
|
||||
b.Fatal("got wrong encoding out")
|
||||
}
|
||||
|
||||
if !bytes.Equal(buf, out) {
|
||||
b.Fatal("input wasnt the same as output", buf, out)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
15
package.json
15
package.json
@@ -9,15 +9,22 @@
|
||||
"gxDependencies": [
|
||||
{
|
||||
"author": "whyrusleeping",
|
||||
"hash": "QmT8rehPR3F6bmwL6zjUN8XpiDBFFpMP2myPdC6ApsWfJf",
|
||||
"name": "go-base58",
|
||||
"version": "0.0.0"
|
||||
"hash": "QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6",
|
||||
"name": "base32",
|
||||
"version": "0.0.2"
|
||||
},
|
||||
{
|
||||
"author": "mr-tron",
|
||||
"hash": "QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY",
|
||||
"name": "go-base58-fast",
|
||||
"version": "0.1.1"
|
||||
}
|
||||
],
|
||||
"gxVersion": "0.8.0",
|
||||
"language": "go",
|
||||
"license": "",
|
||||
"name": "go-multibase",
|
||||
"version": "0.2.1"
|
||||
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
|
||||
"version": "0.2.6"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user