162 * |
162 * |
163 * \attention |
163 * \attention |
164 * Security Note: The shifting operation does \em not erase the previously occupied memory cells. |
164 * Security Note: The shifting operation does \em not erase the previously occupied memory cells. |
165 * But you can easily do that manually, e.g. by calling |
165 * But you can easily do that manually, e.g. by calling |
166 * <code>memset(buffer->bytes, 0, shift)</code> for a right shift or |
166 * <code>memset(buffer->bytes, 0, shift)</code> for a right shift or |
167 * <code>memset(buffer->size, 0, buffer->capacity - buffer->size)</code> |
167 * <code>memset(buffer->bytes + buffer->size, 0, buffer->capacity - buffer->size)</code> |
168 * for a left shift. |
168 * for a left shift. |
169 * |
169 * |
170 * @param buffer the buffer |
170 * @param buffer the buffer |
171 * @param shift the shift offset (negative means left shift) |
171 * @param shift the shift offset (negative means left shift) |
172 * @return 0 on success, non-zero if a required auto-extension fails |
172 * @return 0 on success, non-zero if a required auto-extension fails |