package trie import "github.com/ethereum/go-ethereum/crypto" var keyPrefix = []byte("secure-key-") type SecureTrie struct { *Trie } func NewSecure(root []byte, backend Backend) *SecureTrie { return &SecureTrie{New(root, backend)} } func (self *SecureTrie) Update(key, value []byte) Node { shaKey := crypto.Sha3(key) self.Trie.cache.Put(append(keyPrefix, shaKey...), key) return self.Trie.Update(shaKey, value) } func (self *SecureTrie) UpdateString(key, value string) Node { return self.Update([]byte(key), []byte(value)) } func (self *SecureTrie) Get(key []byte) []byte { return self.Trie.Get(crypto.Sha3(key)) } func (self *SecureTrie) GetString(key string) []byte { return self.Get([]byte(key)) } func (self *SecureTrie) Delete(key []byte) Node { return self.Trie.Delete(crypto.Sha3(key)) } func (self *SecureTrie) DeleteString(key string) Node { return self.Delete([]byte(key)) } func (self *SecureTrie) Copy() *SecureTrie { return &SecureTrie{self.Trie.Copy()} } func (self *SecureTrie) GetKey(shaKey []byte) []byte { return self.Trie.cache.Get(append(keyPrefix, shaKey...)) } /cgit.cgi/'>index : freebsd-ports-gnome
FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cim
Commit message (Expand)AuthorAgeFilesLines
* Use libtool port instead of included version to avoid objformat a.out botchkris2007-02-011-0/+1
* - s,INSTALLS_SHLIB,USE_LDCONFIG,gclsung2006-08-151-1/+1
* Conversion to a single libtool environment.ade2006-02-232-1/+3
* - Add SHA256pav2005-11-251-0/+1
* Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-1/+1
* Update to 3.37lawrance2005-09-103-12/+8
* change the libtool version to use from 1.3 to 1.5oliver2005-06-031-1/+6
* Apply a big libtool patch to allow porters to use the libtool installed bymarcus2004-07-101-1/+1
* Per distfile survey, chase mastersite.linimon2004-04-051-1/+1
* Whoa there, boy, that's a mighty big commit y'all have there...ade2004-03-141-1/+1
* SIZEify.trevor2004-01-291-0/+1
* Fix MASTER_SITESerwin2003-06-081-1/+1
* De-pkg-comment.knu2003-02-212-1/+1
* o Rollback PORTCOMMENT modifications while this feature's implementationlioux2002-11-112-2/+1