Re: [go-nuts] Re: Generating go code using go templates

2021-09-20 Thread Chetan Gowda
Yes. Generating large portions of code via templates is going to be hard. Especially reusing and maintaining it. There is an excellent library called jennifer - https://github.com/dave/jennifer that lets you generate Go code by building the syntax tree. The examples make it super simple to get s

[go-nuts] Re: [crypto/aes] How do I specify an initialization vector?

2017-11-17 Thread Chetan Gowda
Thank you, Conrado. That indeed fixed it. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https:

[go-nuts] Re: [crypto/aes] How do I specify an initialization vector?

2017-11-16 Thread Chetan Gowda
lt_backend()).decryptor() print decryptor.update(cipherdata[:-16]) + decryptor.finalize() Basically, how do I do this in Go using std crypto library? On Thursday, November 16, 2017 at 12:21:51 AM UTC-8, Chetan Gowda wrote: > > Hello, > In Go's standard implementation of AES-

[go-nuts] [crypto/aes] How do I specify an initialization vector?

2017-11-16 Thread Chetan Gowda
Hello, In Go's standard implementation of AES-256 GCM cipher, how do I specify an initialization vector while decrypting data? I would really appreciate if someone can provide me some pointers here. More context: I'm trying to decrypt ApplePay tokens. Apple requires the data to be decrypted usi

[go-nuts] storing transaction in context

2017-02-07 Thread Chetan Gowda
@Dave, isn't storing context in some struct considered anti-pattern? From the package doc: " Programs that use Contexts should follow these rules to keep interfaces consistent across packages and enable static analysis tools to check context propagation: Do not store Contexts inside a struct ty

Re: [go-nuts] Reset Slice with Make Every Time?

2017-01-09 Thread Chetan Gowda
Old data remains as it is in the existing allocation. It will be overwritten as you fill up the slice again. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to gol