(b []byte)
| 87 | } |
| 88 | |
| 89 | func AddPadding(b []byte) []byte { |
| 90 | n := int(fastrand.Uint32n(256-9)) + 9 |
| 91 | nn := len(b) |
| 92 | |
| 93 | b = Resize(b, nn+n) |
| 94 | b = append(b[:1], b...) |
| 95 | |
| 96 | b[0] = uint8(n) |
| 97 | |
| 98 | _, _ = rand.Read(b[nn+1 : nn+n]) |
| 99 | |
| 100 | return b |
| 101 | } |
| 102 | |
| 103 | func FastBytesToString(b []byte) string { |
| 104 | return *(*string)(unsafe.Pointer(&b)) |