KeyID returns data key id.
()
| 662 | |
| 663 | // KeyID returns data key id. |
| 664 | func (t *Table) KeyID() uint64 { |
| 665 | if t.opt.DataKey != nil { |
| 666 | return t.opt.DataKey.KeyId |
| 667 | } |
| 668 | // By default it's 0, if it is plain text. |
| 669 | return 0 |
| 670 | } |
| 671 | |
| 672 | // decrypt decrypts the given data. It should be called only after checking shouldDecrypt. |
| 673 | func (t *Table) decrypt(data []byte) ([]byte, error) { |
no outgoing calls