KeyID returns datakey's ID.
()
| 177 | |
| 178 | // KeyID returns datakey's ID. |
| 179 | func (lf *logFile) keyID() uint64 { |
| 180 | if lf.dataKey == nil { |
| 181 | // If there is no datakey, then we'll return 0. Which means no encryption. |
| 182 | return 0 |
| 183 | } |
| 184 | return lf.dataKey.KeyId |
| 185 | } |
| 186 | |
| 187 | func (lf *logFile) mmap(size int64) (err error) { |
| 188 | if lf.loadingMode != options.MemoryMap { |